Add ESLint (#941)
* Add eslint, switch to lint-staged for precommit * Fix all ESLint errors * Update GH workflow to check prettier and eslint
This commit is contained in:
@@ -36,7 +36,7 @@ router.get(
|
||||
"/",
|
||||
route({ test: { response: { body: "UserRelationsResponse" } } }),
|
||||
async (req: Request, res: Response) => {
|
||||
var mutual_relations: object[] = [];
|
||||
const mutual_relations: object[] = [];
|
||||
const requested_relations = await User.findOneOrFail({
|
||||
where: { id: req.params.id },
|
||||
relations: ["relationships"],
|
||||
@@ -53,7 +53,7 @@ router.get(
|
||||
rmem.type === 1 &&
|
||||
rmem.to_id !== req.user_id
|
||||
) {
|
||||
var relation_user = await User.getPublicUser(rmem.to_id);
|
||||
const relation_user = await User.getPublicUser(rmem.to_id);
|
||||
|
||||
mutual_relations.push({
|
||||
id: relation_user.id,
|
||||
|
||||
Reference in New Issue
Block a user