remove basic

This commit is contained in:
Peter Maquiran
2024-11-06 09:13:36 +01:00
parent ecb2f6c08e
commit 0889e82405
15 changed files with 138 additions and 113 deletions
+49 -49
View File
@@ -158,9 +158,9 @@ export class NotificationsService {
tracing.setAttribute('outcome', 'success')
},
(error) => {
console.error('Permission denied:', error);
tracing.setAttribute('notification.token', 'false')
tracing.setAttribute('outcome', 'failed')
tracing.hasError('Permission denied: request token');
}
);
}
@@ -174,7 +174,7 @@ export class NotificationsService {
}
postToken(token, geturl, tracing: TracingType) {
const headers = { 'Authorization': SessionStore.user.BasicAuthKey };
//const headers = { 'Authorization': SessionStore.user.BasicAuthKey };
const body = {
UserId: SessionStore.user.UserId,
TokenId: token,
@@ -183,7 +183,7 @@ export class NotificationsService {
};
tracing.setAttribute('token.data', token)
this.http.post<Tokenn>(`${geturl}`, body, { headers }).subscribe(data => {
this.http.post<Tokenn>(`${geturl}`, body, { }).subscribe(data => {
this.active = true
tracing.setAttribute('outcome','success')
tracing.finish()
@@ -196,10 +196,10 @@ export class NotificationsService {
DeleteToken(geturl) {
const headers = { 'Authorization': SessionStore.user.BasicAuthKey };
const body = {};
this.http.delete<Tokenn>(`${geturl}`, { headers, body }).subscribe(data => {
this.http.delete<Tokenn>(`${geturl}`, { body }).subscribe(data => {
this.active = true
}, (error) => {
@@ -300,57 +300,57 @@ export class NotificationsService {
}
sendNotificationWithSend(userID, title, bodymsg, roomId) {
const geturl = environment.apiURL + `notifications/send`;
const headers = { 'Authorization': SessionStore.user.BasicAuthKey };
const message = {
"Service": "chat",
"IdObject": roomId
}
let id = 437
this.http.post<Tokenn>(geturl + `?userId=${userID}&title=${title}&body=${bodymsg}`, message, { headers }).subscribe(data => {
this.active = true
}, (error) => {
})
}
// sendNotificationWithSend(userID, title, bodymsg, roomId) {
// const geturl = environment.apiURL + `notifications/send`;
ChatSendMessageNotification(userID, title, bodymsg, roomId) {
const geturl = environment.apiURL + `notifications/sendbyUsername`;
// const message = {
// "Service": "chat",
// "IdObject": roomId
// }
// let id = 437
// this.http.post<Tokenn>(geturl + `?userId=${userID}&title=${title}&body=${bodymsg}`, message, { }).subscribe(data => {
// this.active = true
// }, (error) => {
const headers = { 'Authorization': SessionStore.user.BasicAuthKey };
const message = {
"Service": "chat",
"IdObject": roomId
}
let id = 437
this.http.post<Tokenn>(geturl + `?username=${userID}&title=${title}&body=${bodymsg}`, message, { headers }).subscribe(data => {
this.active = true
}, (error) => {
// })
// }
})
}
ChatSendMessageNotificationGrup(usersID, title, bodymsg, roomId) {
const geturl = environment.apiURL + `notifications/sendByUsernames`;
// ChatSendMessageNotification(userID, title, bodymsg, roomId) {
// const geturl = environment.apiURL + `notifications/sendbyUsername`;
const headers = { 'Authorization': SessionStore.user.BasicAuthKey };
const message = {
"Users": usersID,
"NotificationData": {
"Service": "chat",
"IdObject": roomId
}
}
this.http.post<Tokenn>(geturl + `?title=${title}&body=${bodymsg}`, message, { headers }).subscribe(data => {
this.active = true
}, (error) => {
// const message = {
// "Service": "chat",
// "IdObject": roomId
// }
// let id = 437
// this.http.post<Tokenn>(geturl + `?username=${userID}&title=${title}&body=${bodymsg}`, message, { headers }).subscribe(data => {
// this.active = true
// }, (error) => {
})
}
// })
// }
// ChatSendMessageNotificationGrup(usersID, title, bodymsg, roomId) {
// const geturl = environment.apiURL + `notifications/sendByUsernames`;
// const headers = { 'Authorization': SessionStore.user.BasicAuthKey };
// const message = {
// "Users": usersID,
// "NotificationData": {
// "Service": "chat",
// "IdObject": roomId
// }
// }
// this.http.post<Tokenn>(geturl + `?title=${title}&body=${bodymsg}`, message, { headers }).subscribe(data => {
// this.active = true
// }, (error) => {
// })
// }
tempClearArray(data) {
this.DataArray = new Array;