API noti-admin
This commit is contained in:
parent
de0f477291
commit
aff377985a
2 changed files with 9 additions and 6 deletions
|
|
@ -12,5 +12,7 @@ export default {
|
||||||
msgId: (id: string) => `${message}/my-notifications/${id}`,
|
msgId: (id: string) => `${message}/my-notifications/${id}`,
|
||||||
msgNoread: () => `${message}/my-notifications/noread`,
|
msgNoread: () => `${message}/my-notifications/noread`,
|
||||||
msgInboxDelete: (id: string) => `${message}/my-inboxes/${id}`,
|
msgInboxDelete: (id: string) => `${message}/my-inboxes/${id}`,
|
||||||
|
|
||||||
replyMessage: (id: string) => `${reply}/${id}`,
|
replyMessage: (id: string) => `${reply}/${id}`,
|
||||||
|
msgNotiAdmin: `${env.API_URI}/org/profile/noti-admin`,
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -45,13 +45,14 @@ function onSubmit() {
|
||||||
showLoader();
|
showLoader();
|
||||||
const pathAPI =
|
const pathAPI =
|
||||||
props.type === "Administrator"
|
props.type === "Administrator"
|
||||||
? config.API.replyMessage(props.idInbox)
|
? config.API.msgNotiAdmin
|
||||||
: config.API.replyMessage(props.idInbox);
|
: config.API.replyMessage(props.idInbox);
|
||||||
await http
|
const method = props.type === "Administrator" ? http.post : http.put;
|
||||||
.put(pathAPI, {
|
|
||||||
subject: subject.value,
|
await method(pathAPI, {
|
||||||
body: body.value,
|
subject: subject.value,
|
||||||
})
|
body: body.value,
|
||||||
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
success($q, "ส่งข้อความสำเร็จ");
|
success($q, "ส่งข้อความสำเร็จ");
|
||||||
onClose();
|
onClose();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue