Renaming database primary key

This commit is contained in:
2021-04-23 21:20:02 +10:00
parent 8ffa64a71d
commit e141583f91
8 changed files with 11 additions and 11 deletions
+2 -2
View File
@@ -2,9 +2,9 @@ const jwt = require('jsonwebtoken');
const { tokens } = require('../database/models');
//generates a JWT token based on the given arguments
module.exports = (id, username, type, admin, mod) => {
module.exports = (index, username, type, admin, mod) => {
const content = {
id,
index,
username,
type,
admin,
+1 -1
View File
@@ -24,7 +24,7 @@ module.exports = (token, callback) => {
return callback(403);
}
const result = generate(user.id, user.username, user.type, user.admin, user.mod);
const result = generate(user.index, user.username, user.type, user.admin, user.mod);
destroy(token);