From 0baef5015a2827f189eb61097dc171614a840a12 Mon Sep 17 00:00:00 2001 From: Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> Date: Sat, 27 Mar 2021 21:52:02 +0100 Subject: [PATCH] :bug: remove relative @paths --- .expo/README.md | 17 +++++++++++++++++ .expo/settings.json | 8 ++++++++ jsconfig.json | 11 +++++++++++ package-lock.json | Bin 396416 -> 397989 bytes package.json | 1 + .../api/v8/channels/#channel_id/invites.ts | 8 ++++---- .../#channel_id/messages/bulk-delete.ts | 6 +++--- .../v8/channels/#channel_id/messages/index.ts | 16 ++++++++++++---- src/routes/api/v8/guilds/#id/bans.ts | 12 ++++++------ tsconfig.json | 6 ------ 10 files changed, 62 insertions(+), 23 deletions(-) create mode 100644 .expo/README.md create mode 100644 .expo/settings.json create mode 100644 jsconfig.json diff --git a/.expo/README.md b/.expo/README.md new file mode 100644 index 00000000..d8971e42 --- /dev/null +++ b/.expo/README.md @@ -0,0 +1,17 @@ +> Why do I have a folder named ".expo" in my project? + +The ".expo" folder is created when an Expo project is started using "expo start" command. + +> What does the "packager-info.json" file contain? + +The "packager-info.json" file contains port numbers and process PIDs that are used to serve the application to the mobile device/simulator. + +> What does the "settings.json" file contain? + +The "settings.json" file contains the server configuration that is used to serve the application manifest. + +> Should I commit the ".expo" folder? + +No, you should not share the ".expo" folder. It does not contain any information that is relevant for other developers working on the project, it is specific to your machine. + +Upon project creation, the ".expo" folder is already added to your ".gitignore" file. diff --git a/.expo/settings.json b/.expo/settings.json new file mode 100644 index 00000000..92bc513b --- /dev/null +++ b/.expo/settings.json @@ -0,0 +1,8 @@ +{ + "hostType": "lan", + "lanType": "ip", + "dev": true, + "minify": false, + "urlRandomness": null, + "https": false +} diff --git a/jsconfig.json b/jsconfig.json new file mode 100644 index 00000000..41c4cb9a --- /dev/null +++ b/jsconfig.json @@ -0,0 +1,11 @@ +{ + "compilerOptions": { + "baseUrl": ".", + "paths": { + "@util/*": ["./src/util/*"], + "@middlewares/*": ["./src/middlewares/*"], + "@schema/*": ["./src/schema/*"] + } + }, + "include": ["src"] +} diff --git a/package-lock.json b/package-lock.json index 70a846c85b8e451398418aed0427a32bbc10d0fe..3df732b44de2b4b6972f426c4e24fa8e20143b28 100644 GIT binary patch delta 1058 zcmZpeDY0~^#0FCqb%(0dqWqkk(gOXGV%?IW#Ju9P{Gwdlg2a-HVkIjDr8q-9b3H?g z&AKev5`rj-Gg5O3rhjl}lw<}fn9jJFMPCI&KDDS=Ul(LDNHLJ3Yp6F}-i28?G}yAr zPrFh()3nl0Kea3^ys)$?*xxv(G^sEk!m~IaFwLyM(myl6w;-s(r9$7JB)=rU$IaL> zB0s3y#KI-9%rqsqEXmW=!o?`nF`ytK!mFapyL|dZF=nah6BaT`Ox~Hs%V;#&Oi6C? z9bPWslFEYA;^d;tf)bFI>}-wo%qLG|k(a{l_sM}d;&6YNp!f?dkRbj;6NLLSG9WCp zqAWZxtSYF&(BH|=ARsq8#neJO$kHu2E!3;DJR~t7G&n!gw8*=nG{U!}BDE|eA|)-; zpxiXqHPO?Br>_oT@zx+VireLaS+>gsvnK5X0BpcrTL1t6 delta 147 zcmZ3wRH9*~#0FEA%_%I&63u)H+xZk2zbI%LT9{Z`q?nl+nx>i { // 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(); diff --git a/src/routes/api/v8/guilds/#id/bans.ts b/src/routes/api/v8/guilds/#id/bans.ts index 9fbcf01c..5133ee3c 100644 --- a/src/routes/api/v8/guilds/#id/bans.ts +++ b/src/routes/api/v8/guilds/#id/bans.ts @@ -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(); diff --git a/tsconfig.json b/tsconfig.json index e803612b..97773b99 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -43,12 +43,6 @@ /* Module Resolution Options */ // "moduleResolution": "node", /* Specify module resolution strategy: 'node' (Node.js) or 'classic' (TypeScript pre-1.6). */ - "baseUrl": "./src" /* Base directory to resolve non-absolute module names. */, - "paths": { - "@util/*": ["util/*"], - "@middlewares/*": ["middlewares/*"], - "@schema/*": ["schema/*"] - } /* A series of entries which re-map imports to lookup locations relative to the 'baseUrl'. */, // "rootDirs": [], /* List of root folders whose combined content represents the structure of the project at runtime. */ // "typeRoots": [], /* List of folders to include type definitions from. */ "types": ["node"] /* Type declaration files to be included in compilation. */,