1
0
mirror of https://github.com/misskey-dev/misskey.git synced 2026-05-04 07:16:14 +02:00

Refactoring, Clean up and bug fixes

This commit is contained in:
syuilo
2018-11-02 03:32:24 +09:00
parent b4b9e76c8d
commit 931bdc6aac
108 changed files with 1722 additions and 1539 deletions

View File

@@ -1,4 +1,4 @@
import $ from 'cafy'; import ID from '../../../../misc/cafy-id';
import $ from 'cafy'; import ID, { transform, ObjectId } from '../../../../misc/cafy-id';
import { ILocalUser, getRelation } from '../../../../models/user';
import getParams from '../../get-params';
@@ -10,11 +10,13 @@ export const meta = {
requireCredential: true,
params: {
userId: $.or($.type(ID), $.arr($.type(ID)).unique()).note({
userId: {
validator: $.or($.type(ID), $.arr($.type(ID)).unique()),
transform: (v: any): ObjectId | ObjectId[] => Array.isArray(v) ? v.map(x => transform(x)) : transform(v),
desc: {
'ja-JP': 'ユーザーID (配列でも可)'
}
})
}
}
};