mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-06 03:50:26 +02:00
Add notifications in the client
This commit is contained in:
parent
f7cc67b455
commit
2f1548fda3
56 changed files with 1073 additions and 112 deletions
|
@ -54,6 +54,16 @@ function markAsReadNotifications (url: string, token: string, ids: number[], sta
|
|||
statusCodeExpected
|
||||
})
|
||||
}
|
||||
function markAsReadAllNotifications (url: string, token: string, statusCodeExpected = 204) {
|
||||
const path = '/api/v1/users/me/notifications/read-all'
|
||||
|
||||
return makePostBodyRequest({
|
||||
url,
|
||||
path,
|
||||
token,
|
||||
statusCodeExpected
|
||||
})
|
||||
}
|
||||
|
||||
async function getLastNotification (serverUrl: string, accessToken: string) {
|
||||
const res = await getUserNotifications(serverUrl, accessToken, 0, 1, undefined, '-createdAt')
|
||||
|
@ -409,6 +419,7 @@ export {
|
|||
CheckerBaseParams,
|
||||
CheckerType,
|
||||
checkNotification,
|
||||
markAsReadAllNotifications,
|
||||
checkMyVideoImportIsFinished,
|
||||
checkUserRegistered,
|
||||
checkVideoIsPublished,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue