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