mirror of
https://github.com/misskey-dev/misskey.git
synced 2026-05-20 09:25:33 +02:00
refactor: resolve #7139
This commit is contained in:
@@ -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(),
|
||||
|
||||
Reference in New Issue
Block a user