chore: upgrade sequelize (#965)
* 0.18.0 * chore: Upgrade sequelize 4 -> 5 * fix: migrations v5 support * fix: Majority of test failures * fix: the rest of v5 tests
This commit is contained in:
@@ -13,7 +13,7 @@ export async function getUserForJWT(token: string) {
|
||||
|
||||
if (!payload) throw new AuthenticationError('Invalid token');
|
||||
|
||||
const user = await User.findById(payload.id);
|
||||
const user = await User.findByPk(payload.id);
|
||||
|
||||
try {
|
||||
JWT.verify(token, user.jwtSecret);
|
||||
|
||||
@@ -7,7 +7,7 @@ import { Collection, Document } from '../models';
|
||||
|
||||
async function addToArchive(zip, documents) {
|
||||
for (const doc of documents) {
|
||||
const document = await Document.findById(doc.id);
|
||||
const document = await Document.findByPk(doc.id);
|
||||
|
||||
zip.file(`${document.title}.md`, unescape(document.text));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user