Merge pull request #123 from bipproduction/lukman/16-agustus-2024

feat : update create
This commit is contained in:
Amalia
2024-08-16 17:19:56 +08:00
committed by GitHub
6 changed files with 122 additions and 150 deletions

View File

@@ -49,14 +49,17 @@ export async function GET(request: Request) {
name: true
}
}
},
orderBy: {
createdAt: 'desc'
}
});
const allOmit = data.map((v: any) => ({
..._.omit(v, ["User"]),
user_name: v.User.name,
timeStart: moment(v.timeStart).format('LT'),
timeEnd: moment(v.timeEnd).format('LT')
timeStart: moment.utc(v.timeStart).format('HH:mm'),
timeEnd: moment.utc(v.timeEnd).format('HH:mm')
}))