diff --git a/database/entities/Object.ts b/database/entities/Object.ts index 5fed8be3..9e176f31 100644 --- a/database/entities/Object.ts +++ b/database/entities/Object.ts @@ -28,7 +28,7 @@ export const createFromObject = async (object: LysandObjectType) => { return await client.lysandObject.create({ data: { authorId: author?.id, - created_at: new Date(object.created_at), + created_at: new Date(object.created_at).toISOString(), extensions: object.extensions || {}, remote_id: object.id, type: object.type, diff --git a/server/api/oauth/token/index.ts b/server/api/oauth/token/index.ts index 43302c06..e0abbaeb 100644 --- a/server/api/oauth/token/index.ts +++ b/server/api/oauth/token/index.ts @@ -58,6 +58,6 @@ export default apiRoute<{ access_token: token.access_token, token_type: token.token_type, scope: token.scope, - created_at: token.created_at, + created_at: new Date(token.created_at).toISOString(), }); });