mirror of
https://github.com/spacebarchat/server.git
synced 2026-08-28 21:28:20 +00:00
Prettier 8
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
import { route } from "@spacebar/api";
|
||||
import { User } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { UserRelationsResponse } from "@spacebar/schemas"
|
||||
import { UserRelationsResponse } from "@spacebar/schemas";
|
||||
|
||||
const router: Router = Router({ mergeParams: true });
|
||||
|
||||
@@ -47,11 +47,7 @@ router.get(
|
||||
|
||||
for (const rmem of requested_relations.relationships) {
|
||||
for (const smem of self_relations.relationships)
|
||||
if (
|
||||
rmem.to_id === smem.to_id &&
|
||||
rmem.type === 1 &&
|
||||
rmem.to_id !== req.user_id
|
||||
) {
|
||||
if (rmem.to_id === smem.to_id && rmem.type === 1 && rmem.to_id !== req.user_id) {
|
||||
const relation_user = await User.getPublicUser(rmem.to_id);
|
||||
|
||||
mutual_relations.push({
|
||||
|
||||
@@ -17,13 +17,9 @@
|
||||
*/
|
||||
|
||||
import { route } from "@spacebar/api";
|
||||
import {
|
||||
Channel,
|
||||
Member,
|
||||
OrmUtils,
|
||||
} from "@spacebar/util";
|
||||
import { Channel, Member, OrmUtils } from "@spacebar/util";
|
||||
import { Request, Response, Router } from "express";
|
||||
import { UserGuildSettingsSchema } from "@spacebar/schemas"
|
||||
import { UserGuildSettingsSchema } from "@spacebar/schemas";
|
||||
|
||||
const router = Router({ mergeParams: true });
|
||||
|
||||
|
||||
@@ -20,13 +20,7 @@ import { Request } from "express";
|
||||
import { ntob } from "./Base64";
|
||||
import { FieldErrors, Random } from "@spacebar/util";
|
||||
|
||||
export function checkLength(
|
||||
str: string,
|
||||
min: number,
|
||||
max: number,
|
||||
key: string,
|
||||
req: Request,
|
||||
) {
|
||||
export function checkLength(str: string, min: number, max: number, key: string, req: Request) {
|
||||
if (str.length < min || str.length > max) {
|
||||
throw FieldErrors({
|
||||
[key]: {
|
||||
|
||||
Reference in New Issue
Block a user