🐛 remove relative @paths
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import { Router, Request, Response } from "express";
|
||||
import { HTTPError } from "lambert-server";
|
||||
|
||||
import { check } from "@util/instanceOf";
|
||||
import { random } from "@util/RandomInviteID";
|
||||
import { emitEvent } from "@util/Event";
|
||||
import { check } from "../../../../../util/instanceOf";
|
||||
import { random } from "../../../../../util/RandomInviteID";
|
||||
import { emitEvent } from "../../../../../util/Event";
|
||||
|
||||
import { InviteCreateSchema } from "@schema/Invite";
|
||||
import { InviteCreateSchema } from "../../../../../schema/Invite";
|
||||
|
||||
import { getPermission, ChannelModel, InviteModel, InviteCreateEvent } from "fosscord-server-util";
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { Router } from "express";
|
||||
import { ChannelModel, getPermission, MessageDeleteBulkEvent, MessageModel } from "fosscord-server-util";
|
||||
import { HTTPError } from "lambert-server";
|
||||
import Config from "@util/Config";
|
||||
import { emitEvent } from "@util/Event";
|
||||
import { check } from "@util/instanceOf";
|
||||
import Config from "../../../../../../util/Config";
|
||||
import { emitEvent } from "../../../../../../util/Event";
|
||||
import { check } from "../../../../../../util/instanceOf";
|
||||
|
||||
const router: Router = Router();
|
||||
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { Router } from "express";
|
||||
import { ChannelModel, ChannelType, getPermission, Message, MessageCreateEvent, MessageModel, Snowflake } from "fosscord-server-util";
|
||||
import { HTTPError } from "lambert-server";
|
||||
import { MessageCreateSchema } from "@schema/Message";
|
||||
import { check, instanceOf, Length } from "@util/instanceOf";
|
||||
import { PublicUserProjection } from "@util/User";
|
||||
import { MessageCreateSchema } from "../../../../../../schema/Message";
|
||||
import { check, instanceOf, Length } from "../../../../../../util/instanceOf";
|
||||
import { PublicUserProjection } from "../../../../../../util/User";
|
||||
import multer from "multer";
|
||||
import { emitEvent } from "@util/Event";
|
||||
import { emitEvent } from "../../../../../../util/Event";
|
||||
const router: Router = Router();
|
||||
|
||||
export default router;
|
||||
@@ -111,6 +111,7 @@ router.post("/", check(MessageCreateSchema), async (req, res) => {
|
||||
// TODO: should it be checked if the message exists?
|
||||
}
|
||||
|
||||
// TODO: properly build message object
|
||||
const message: Message = {
|
||||
id: Snowflake.generate(),
|
||||
channel_id,
|
||||
@@ -118,6 +119,13 @@ router.post("/", check(MessageCreateSchema), async (req, res) => {
|
||||
author_id: req.user_id,
|
||||
content: req.body,
|
||||
timestamp: new Date(),
|
||||
mention_channels_ids: [],
|
||||
mention_role_ids: [],
|
||||
mention_user_ids: [],
|
||||
attachments: [],
|
||||
embeds: [],
|
||||
reactions: [],
|
||||
type: 0,
|
||||
};
|
||||
|
||||
await new MessageModel(message).save();
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { Request, Response, Router } from "express";
|
||||
import { BanModel, getPermission, GuildBanAddEvent, GuildBanRemoveEvent, GuildModel } from "fosscord-server-util";
|
||||
import { HTTPError } from "lambert-server";
|
||||
import { getIpAdress } from "@middlewares/GlobalRateLimit";
|
||||
import { BanCreateSchema } from "@schema/Ban";
|
||||
import { emitEvent } from "@util/Event";
|
||||
import { check } from "@util/instanceOf";
|
||||
import { removeMember } from "@util/Member";
|
||||
import { getPublicUser } from "@util/User";
|
||||
import { getIpAdress } from "../../../../../middlewares/GlobalRateLimit";
|
||||
import { BanCreateSchema } from "../../../../../schema/Ban";
|
||||
import { emitEvent } from "../../../../../util/Event";
|
||||
import { check } from "../../../../../util/instanceOf";
|
||||
import { removeMember } from "../../../../../util/Member";
|
||||
import { getPublicUser } from "../../../../../util/User";
|
||||
|
||||
const router: Router = Router();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user