Resolve #3238
This commit is contained in:
parent
0fc965f342
commit
b34c1379e9
18 changed files with 234 additions and 11 deletions
|
|
@ -2,6 +2,7 @@ import $ from 'cafy';
|
|||
import { ID } from '../../../../misc/cafy-id';
|
||||
import define from '../../define';
|
||||
import { Users } from '../../../../models';
|
||||
import { insertModerationLog } from '../../../../services/insert-moderation-log';
|
||||
|
||||
export const meta = {
|
||||
desc: {
|
||||
|
|
@ -25,7 +26,7 @@ export const meta = {
|
|||
}
|
||||
};
|
||||
|
||||
export default define(meta, async (ps) => {
|
||||
export default define(meta, async (ps, me) => {
|
||||
const user = await Users.findOne(ps.userId as string);
|
||||
|
||||
if (user == null) {
|
||||
|
|
@ -35,4 +36,8 @@ export default define(meta, async (ps) => {
|
|||
await Users.update(user.id, {
|
||||
isSuspended: false
|
||||
});
|
||||
|
||||
insertModerationLog(me, 'unsuspend', {
|
||||
targetId: user.id,
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue