mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +00:00
remove basic
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user