Refactor code
This commit is contained in:
parent
62f73e87d1
commit
7dc8d12acb
|
@ -63,7 +63,7 @@ async function block(req, res) {
|
|||
userId = targetUser.id;
|
||||
userName = targetUser.name;
|
||||
|
||||
let ret = null;
|
||||
let ret;
|
||||
if (blocking) {
|
||||
ret = await UserBlock.findOrCreate({
|
||||
where: {
|
||||
|
@ -85,8 +85,8 @@ async function block(req, res) {
|
|||
/*
|
||||
* delete possible dm channel
|
||||
*/
|
||||
let dmu1id = null;
|
||||
let dmu2id = null;
|
||||
let dmu1id;
|
||||
let dmu2id;
|
||||
if (user.id > userId) {
|
||||
dmu1id = userId;
|
||||
dmu2id = user.id;
|
||||
|
|
|
@ -78,8 +78,8 @@ async function startDm(req, res) {
|
|||
/*
|
||||
* start DM session
|
||||
*/
|
||||
let dmu1id = null;
|
||||
let dmu2id = null;
|
||||
let dmu1id;
|
||||
let dmu2id;
|
||||
if (user.id > userId) {
|
||||
dmu1id = userId;
|
||||
dmu2id = user.id;
|
||||
|
|
Loading…
Reference in New Issue
Block a user