This commit is contained in:
syuilo 2018-04-24 23:34:18 +09:00
parent 070cd52c21
commit 1a13c7e0b1
8 changed files with 11 additions and 10 deletions

View File

@ -88,7 +88,7 @@
"autwh": "0.1.0",
"bcryptjs": "2.4.3",
"bootstrap-vue": "2.0.0-rc.6",
"cafy": "5.1.0",
"cafy": "6.0.0",
"chai": "4.1.2",
"chai-http": "4.0.0",
"chalk": "2.4.0",

View File

@ -19,7 +19,7 @@ export default class ID extends Query<mongo.ObjectID> {
}
};
this.pushFirstTimeValidator(v => {
this.pushValidator(v => {
if (!mongo.ObjectID.prototype.isPrototypeOf(v) && isNotAnId(v)) {
return new Error('must-be-an-id');
}

View File

@ -17,7 +17,7 @@
<router-link to="/i/favorites">%fa:star%<span>%i18n:@favorites%</span>%fa:angle-right%</router-link>
</li>
<li @click="list">
<p>%fa:cog%<span>%i18n:@lists%</span>%fa:angle-right%</p>
<p>%fa:list%<span>%i18n:@lists%</span>%fa:angle-right%</p>
</li>
</ul>
<ul>

View File

@ -1,5 +1,6 @@
import * as mongo from 'mongodb';
import deepcopy = require('deepcopy');
import sequential = require('promise-sequential');
import rap from '@prezzemolo/rap';
import db from '../db/mongodb';
import Note, { pack as packNote, deleteNote } from './note';
@ -167,9 +168,9 @@ export async function deleteUser(user: string | mongo.ObjectID | IUser) {
).map(x => deleteAccessToken(x)));
// このユーザーのNoteをすべて削除
await Promise.all((
await Note.find({ userId: u._id })
).map(x => deleteNote(x)));
//await sequential((
// await Note.find({ userId: u._id })
//).map(x => () => deleteNote(x)));
// このユーザーのNoteReactionをすべて削除
await Promise.all((

View File

@ -3,7 +3,7 @@
*/
import rndstr from 'rndstr';
const crypto = require('crypto');
import $ from 'cafy'; import ID from '../../../../cafy-id';
import $ from 'cafy';
import App from '../../../../models/app';
import AuthSess from '../../../../models/auth-session';
import AccessToken from '../../../../models/access-token';

View File

@ -2,7 +2,7 @@
* Module dependencies
*/
const ms = require('ms');
import $ from 'cafy'; import ID from '../../../../cafy-id';
import $ from 'cafy';
import Note, { pack } from '../../../../models/note';
/**

View File

@ -2,7 +2,7 @@
* Module dependencies
*/
const ms = require('ms');
import $ from 'cafy'; import ID from '../../../../cafy-id';
import $ from 'cafy';
import User, { pack } from '../../../../models/user';
import { getFriendIds } from '../../common/get-friends';
import Mute from '../../../../models/mute';

View File

@ -2,7 +2,7 @@
* Module dependencies
*/
import * as mongo from 'mongodb';
import $ from 'cafy'; import ID from '../../../../cafy-id';
import $ from 'cafy';
import User, { pack } from '../../../../models/user';
import config from '../../../../config';
const escapeRegexp = require('escape-regexp');