fix noti ติด promise
This commit is contained in:
parent
bce74cca54
commit
ad97270752
1 changed files with 5 additions and 3 deletions
|
|
@ -1013,9 +1013,11 @@ export class CommandController extends Controller {
|
||||||
if (command.commandExcecuteDate == null)
|
if (command.commandExcecuteDate == null)
|
||||||
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบวันที่คำสั่งมีผล");
|
throw new HttpError(HttpStatusCode.NOT_FOUND, "ไม่พบวันที่คำสั่งมีผล");
|
||||||
|
|
||||||
let profiles = command.commandRecives
|
let profiles = command && command.commandRecives.length > 0
|
||||||
.filter((x) => x.profileId != null)
|
? command.commandRecives
|
||||||
.map(async (x) => x.profileId);
|
.filter((x) => x.profileId != null)
|
||||||
|
.map((x) => x.profileId)
|
||||||
|
: [];
|
||||||
|
|
||||||
await new CallAPI()
|
await new CallAPI()
|
||||||
.PostData(request, "/placement/noti/profiles", {
|
.PostData(request, "/placement/noti/profiles", {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue