summary refs log tree commit diff
path: root/api
diff options
context:
space:
mode:
Diffstat (limited to 'api')
-rw-r--r--api/.swcrc17
-rw-r--r--api/package-lock.json2
-rw-r--r--api/src/routes/channels/#channel_id/messages/index.ts3
3 files changed, 2 insertions, 20 deletions
diff --git a/api/.swcrc b/api/.swcrc
deleted file mode 100644

index 794efbd7..00000000 --- a/api/.swcrc +++ /dev/null
@@ -1,17 +0,0 @@ -{ - "module": { - "type": "commonjs" - }, - "jsc": { - "parser": { - "syntax": "typescript", - "decorators": true - }, - "target": "es2021", - "baseUrl": "./", - "paths": { - "@fosscord/api": ["src/index.ts"], - "@fosscord/api/*": ["src/*"] - } - } -} diff --git a/api/package-lock.json b/api/package-lock.json
index 2af8c7b9..f4e7506c 100644 --- a/api/package-lock.json +++ b/api/package-lock.json
@@ -104,7 +104,6 @@ "pg": "^8.7.1", "reflect-metadata": "^0.1.13", "sqlite3": "^5.0.2", - "swc": "^1.0.11", "tsconfig-paths": "^3.11.0", "typeorm": "^0.2.37", "typescript": "^4.4.2", @@ -18403,7 +18402,6 @@ "pg": "^8.7.1", "reflect-metadata": "^0.1.13", "sqlite3": "^5.0.2", - "swc": "^1.0.11", "tsconfig-paths": "^3.11.0", "typeorm": "^0.2.37", "typescript": "^4.4.2", diff --git a/api/src/routes/channels/#channel_id/messages/index.ts b/api/src/routes/channels/#channel_id/messages/index.ts
index d3321fae..1f856b80 100644 --- a/api/src/routes/channels/#channel_id/messages/index.ts +++ b/api/src/routes/channels/#channel_id/messages/index.ts
@@ -22,7 +22,7 @@ const router: Router = Router(); export default router; -export function isTextChannel(type: ChannelType): boolean { +function isTextChannel(type: ChannelType): boolean { switch (type) { case ChannelType.GUILD_STORE: case ChannelType.GUILD_VOICE: @@ -39,6 +39,7 @@ export function isTextChannel(type: ChannelType): boolean { return true; } } +module.exports.isTextChannel = isTextChannel; export interface MessageCreateSchema { content?: string;