テーブル分割

This commit is contained in:
syuilo
2019-04-10 15:04:27 +09:00
parent 9603f3fa4f
commit 626cfb61ac
33 changed files with 267 additions and 232 deletions

View File

@ -3,7 +3,7 @@ import { ID } from '../../../../misc/cafy-id';
import define from '../../define';
import * as bcrypt from 'bcryptjs';
import rndstr from 'rndstr';
import { Users } from '../../../../models';
import { Users, UserProfiles } from '../../../../models';
export const meta = {
desc: {
@ -42,7 +42,9 @@ export default define(meta, async (ps) => {
// Generate hash of password
const hash = bcrypt.hashSync(passwd);
await Users.update(user.id, {
await UserProfiles.update({
userId: user.id
}, {
password: hash
});