mirror of
https://github.com/He4eT/simple-spaceapi.git
synced 2026-05-05 01:47:24 +00:00
SpaceAPI: add undefined to state.open
This commit is contained in:
parent
97a681fff6
commit
585622403c
3 changed files with 13 additions and 4 deletions
|
|
@ -128,7 +128,14 @@ export default ({ strapi }: { strapi: Core.Strapi }) => ({
|
|||
});
|
||||
|
||||
if (!isEmpty(state)) {
|
||||
result.state = pickFields(['open', 'trigger_person', 'message'])(state);
|
||||
result.state = pickFields(['trigger_person', 'message'])(state);
|
||||
|
||||
if (['True', 'False'].includes(state.open)) {
|
||||
result.state.open = {
|
||||
True: true,
|
||||
False: false,
|
||||
}[state.open];
|
||||
}
|
||||
|
||||
result.state.lastchange = dateTimeToUnixtime(String(state.updatedAt));
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue