refactor: resolve #7139
This commit is contained in:
parent
ebadd7fd3f
commit
91172654e4
76 changed files with 107 additions and 221 deletions
|
|
@ -1,6 +1,5 @@
|
|||
import define from '../define';
|
||||
import { RegistryItems, UserProfiles, Users } from '../../../models';
|
||||
import { ensure } from '../../../prelude/ensure';
|
||||
import { genId } from '../../../misc/gen-id';
|
||||
|
||||
export const meta = {
|
||||
|
|
@ -25,7 +24,7 @@ export default define(meta, async (ps, user, token) => {
|
|||
const isSecure = token == null;
|
||||
|
||||
// TODO: そのうち消す
|
||||
const profile = await UserProfiles.findOne(user.id).then(ensure);
|
||||
const profile = await UserProfiles.findOneOrFail(user.id);
|
||||
for (const [k, v] of Object.entries(profile.clientData)) {
|
||||
await RegistryItems.insert({
|
||||
id: genId(),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue