Skip to content
This repository was archived by the owner on Feb 4, 2025. It is now read-only.

Commit b691c6f

Browse files
committed
feat(api): add created_at column for users
1 parent 3202e12 commit b691c6f

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
exports.up = function (pgm) {
2+
pgm.addColumns('users', {
3+
created_at: { type: 'timestamp', notNull: true, default: pgm.func('NOW()') }
4+
})
5+
}
6+
7+
exports.down = function (pgm) {
8+
pgm.dropColumns('users', ['created_at'])
9+
}

server/api/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export default async (fastify) => {
8181
user = await db.auth.getUserById({
8282
id: uuid
8383
})
84-
if (user === null) {
84+
if (!user) {
8585
sendResponse(responses.badToken)
8686
return
8787
}

0 commit comments

Comments
 (0)