change 'delete' to 'remove' everywhere to be consistent (#2834)

This commit is contained in:
Aiden McClelland
2025-02-20 17:14:04 -07:00
committed by GitHub
parent d63341ea06
commit 40d194672b
8 changed files with 26 additions and 25 deletions

View File

@@ -132,10 +132,10 @@ export module RR {
} // notification.list
export type GetNotificationsRes = ServerNotification<number>[]
export type DeleteNotificationReq = { id: number } // notification.delete
export type DeleteNotificationReq = { id: number } // notification.remove
export type DeleteNotificationRes = null
export type DeleteAllNotificationsReq = { before: number } // notification.delete-before
export type DeleteAllNotificationsReq = { before: number } // notification.remove-before
export type DeleteAllNotificationsRes = null
// wifi
@@ -166,7 +166,7 @@ export module RR {
export type ConnectWifiReq = { ssid: string } // wifi.connect
export type ConnectWifiRes = null
export type DeleteWifiReq = { ssid: string } // wifi.delete
export type DeleteWifiReq = { ssid: string } // wifi.remove
export type DeleteWifiRes = null
// ssh
@@ -177,7 +177,7 @@ export module RR {
export type AddSSHKeyReq = { key: string } // ssh.add
export type AddSSHKeyRes = SSHKey
export type DeleteSSHKeyReq = { fingerprint: string } // ssh.delete
export type DeleteSSHKeyReq = { fingerprint: string } // ssh.remove
export type DeleteSSHKeyRes = null
// backup

View File

@@ -37,7 +37,7 @@ export class LiveApiService extends ApiService {
@Inject(PATCH_CACHE) private readonly cache$: Observable<Dump<DataModel>>,
) {
super()
; (window as any).rpcClient = this
;(window as any).rpcClient = this
}
// for sideloading packages
@@ -343,14 +343,14 @@ export class LiveApiService extends ApiService {
async deleteNotification(
params: RR.DeleteNotificationReq,
): Promise<RR.DeleteNotificationRes> {
return this.rpcRequest({ method: 'notification.delete', params })
return this.rpcRequest({ method: 'notification.remove', params })
}
async deleteAllNotifications(
params: RR.DeleteAllNotificationsReq,
): Promise<RR.DeleteAllNotificationsRes> {
return this.rpcRequest({
method: 'notification.delete-before',
method: 'notification.remove-before',
params,
})
}
@@ -379,7 +379,7 @@ export class LiveApiService extends ApiService {
}
async deleteWifi(params: RR.DeleteWifiReq): Promise<RR.DeleteWifiRes> {
return this.rpcRequest({ method: 'wifi.delete', params })
return this.rpcRequest({ method: 'wifi.remove', params })
}
// smtp
@@ -407,7 +407,7 @@ export class LiveApiService extends ApiService {
}
async deleteSshKey(params: RR.DeleteSSHKeyReq): Promise<RR.DeleteSSHKeyRes> {
return this.rpcRequest({ method: 'ssh.delete', params })
return this.rpcRequest({ method: 'ssh.remove', params })
}
// backup
@@ -518,7 +518,7 @@ export class LiveApiService extends ApiService {
async removeAcme(params: RR.RemoveAcmeReq): Promise<RR.RemoveAcmeRes> {
return this.rpcRequest({
method: 'net.acme.delete',
method: 'net.acme.remove',
params,
})
}