use ISOString to create new posts

This commit is contained in:
srgooglo 2022-10-12 00:31:46 +02:00
parent ab8eaa0dbe
commit 6c18614599
2 changed files with 2 additions and 2 deletions

View File

@ -8,7 +8,7 @@ export default async (payload) => {
user_id: typeof user_id === "object" ? user_id.toString() : user_id,
message: String(message).toString(),
additions: additions ?? [],
created_at: new Date().getTime(),
created_at: new Date().toISOString(),
type: type,
data: data,
})

View File

@ -1,6 +1,6 @@
export default {
user_id: { type: String, required: true },
created_at: { type: Number, required: true },
created_at: { type: String, required: true },
message: { type: String, required: true },
likes: { type: Array, default: [] },
additions: { type: Array, default: [] },