mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-31 04:23:40 +00:00
delete all endpoint update
This commit is contained in:
committed by
Matt Hill
parent
81fdd80773
commit
26840ab098
@@ -57,7 +57,7 @@ export class NotificationsPage {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
async delete (id: string, index: number): Promise<void> {
|
async delete (id: number, index: number): Promise<void> {
|
||||||
const loader = await this.loadingCtrl.create({
|
const loader = await this.loadingCtrl.create({
|
||||||
spinner: 'lines',
|
spinner: 'lines',
|
||||||
message: 'Deleting...',
|
message: 'Deleting...',
|
||||||
@@ -85,7 +85,7 @@ export class NotificationsPage {
|
|||||||
await loader.present()
|
await loader.present()
|
||||||
|
|
||||||
try {
|
try {
|
||||||
await this.embassyApi.deleteAllNotifications({ })
|
await this.embassyApi.deleteAllNotifications({ before: this.notifications[0].id })
|
||||||
this.notifications = []
|
this.notifications = []
|
||||||
this.beforeCursor = undefined
|
this.beforeCursor = undefined
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|||||||
@@ -71,10 +71,10 @@ export module RR {
|
|||||||
export type GetNotificationsReq = WithExpire<{ before?: number, after?: number, limit?: number }> // notification.list
|
export type GetNotificationsReq = WithExpire<{ before?: number, after?: number, limit?: number }> // notification.list
|
||||||
export type GetNotificationsRes = WithRevision<ServerNotification<number>[]>
|
export type GetNotificationsRes = WithRevision<ServerNotification<number>[]>
|
||||||
|
|
||||||
export type DeleteNotificationReq = { id: string } // notification.delete
|
export type DeleteNotificationReq = { id: number } // notification.delete
|
||||||
export type DeleteNotificationRes = null
|
export type DeleteNotificationRes = null
|
||||||
|
|
||||||
export type DeleteAllNotificationsReq = { } // notification.delete.all
|
export type DeleteAllNotificationsReq = { before: number } // notification.delete.all
|
||||||
export type DeleteAllNotificationsRes = null
|
export type DeleteAllNotificationsRes = null
|
||||||
|
|
||||||
// wifi
|
// wifi
|
||||||
|
|||||||
@@ -143,7 +143,7 @@ export class LiveApiService extends ApiService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async deleteAllNotifications (params: RR.DeleteAllNotificationsReq): Promise <RR.DeleteAllNotificationsRes> {
|
async deleteAllNotifications (params: RR.DeleteAllNotificationsReq): Promise <RR.DeleteAllNotificationsRes> {
|
||||||
return this.http.rpcRequest({ method: 'notification.delete.all', params })
|
return this.http.rpcRequest({ method: 'notification.delete-before', params })
|
||||||
}
|
}
|
||||||
|
|
||||||
// wifi
|
// wifi
|
||||||
|
|||||||
Reference in New Issue
Block a user