wip
This commit is contained in:
@ -1,18 +1,12 @@
|
||||
/**
|
||||
* Module dependencies
|
||||
*/
|
||||
import $ from 'cafy'; import ID from '../../../../cafy-id';
|
||||
import Note from '../../../../models/note';
|
||||
import Reaction, { pack } from '../../../../models/note-reaction';
|
||||
import { ILocalUser } from '../../../../models/user';
|
||||
|
||||
/**
|
||||
* Show reactions of a note
|
||||
*
|
||||
* @param {any} params
|
||||
* @param {any} user
|
||||
* @return {Promise<any>}
|
||||
*/
|
||||
module.exports = (params, user) => new Promise(async (res, rej) => {
|
||||
module.exports = (params: any, user: ILocalUser) => new Promise(async (res, rej) => {
|
||||
// Get 'noteId' parameter
|
||||
const [noteId, noteIdErr] = $.type(ID).get(params.noteId);
|
||||
if (noteIdErr) return rej('invalid noteId param');
|
||||
|
Reference in New Issue
Block a user