forked from mirror/misskey
Clean up
This commit is contained in:
parent
3148be7792
commit
7bf27dc4ed
@ -15,8 +15,7 @@ import Post from '../../models/post';
|
||||
* @return {Promise<object>}
|
||||
*/
|
||||
module.exports = (params, user) =>
|
||||
new Promise(async (res, rej) =>
|
||||
{
|
||||
new Promise(async (res, rej) => {
|
||||
// Get 'post_id' parameter
|
||||
let postId = params.post_id;
|
||||
if (postId === undefined || postId === null) {
|
||||
@ -32,7 +31,7 @@ module.exports = (params, user) =>
|
||||
return rej('post not found');
|
||||
}
|
||||
|
||||
// Check arleady favorited
|
||||
// Check already favorited
|
||||
const exist = await Favorite.findOne({
|
||||
post_id: post._id,
|
||||
user_id: user._id
|
||||
|
@ -15,8 +15,7 @@ import Post from '../../models/post';
|
||||
* @return {Promise<object>}
|
||||
*/
|
||||
module.exports = (params, user) =>
|
||||
new Promise(async (res, rej) =>
|
||||
{
|
||||
new Promise(async (res, rej) => {
|
||||
// Get 'post_id' parameter
|
||||
let postId = params.post_id;
|
||||
if (postId === undefined || postId === null) {
|
||||
|
@ -17,8 +17,7 @@ import notify from '../../../common/notify';
|
||||
* @return {Promise<object>}
|
||||
*/
|
||||
module.exports = (params, user) =>
|
||||
new Promise(async (res, rej) =>
|
||||
{
|
||||
new Promise(async (res, rej) => {
|
||||
// Get 'post_id' parameter
|
||||
let postId = params.post_id;
|
||||
if (postId === undefined || postId === null) {
|
||||
|
@ -17,8 +17,7 @@ import User from '../../../models/user';
|
||||
* @return {Promise<object>}
|
||||
*/
|
||||
module.exports = (params, user) =>
|
||||
new Promise(async (res, rej) =>
|
||||
{
|
||||
new Promise(async (res, rej) => {
|
||||
// Get 'post_id' parameter
|
||||
let postId = params.post_id;
|
||||
if (postId === undefined || postId === null) {
|
||||
|
@ -16,8 +16,7 @@ import notify from '../../../common/notify';
|
||||
* @return {Promise<object>}
|
||||
*/
|
||||
module.exports = (params, user) =>
|
||||
new Promise(async (res, rej) =>
|
||||
{
|
||||
new Promise(async (res, rej) => {
|
||||
// Get 'post_id' parameter
|
||||
const postId = params.post_id;
|
||||
if (postId === undefined || postId === null) {
|
||||
|
Loading…
Reference in New Issue
Block a user