Fix bug
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
import * as mongo from 'mongodb';
|
||||
import Note from '../../../models/note';
|
||||
import { IRemoteUser } from '../../../models/user';
|
||||
import { ILike } from '../type';
|
||||
@@ -9,7 +10,7 @@ export default async (actor: IRemoteUser, activity: ILike) => {
|
||||
// Transform:
|
||||
// https://misskey.ex/notes/xxxx to
|
||||
// xxxx
|
||||
const noteId = id.split('/').pop();
|
||||
const noteId = new mongo.ObjectID(id.split('/').pop());
|
||||
|
||||
const note = await Note.findOne({ _id: noteId });
|
||||
if (note === null) {
|
||||
|
||||
Reference in New Issue
Block a user