mirror of
https://github.com/spacebarchat/server.git
synced 2026-09-16 12:52:43 +00:00
🐛 fix Webhook model
This commit is contained in:
@@ -80,4 +80,5 @@ WebhookSchema.virtual("source_channel", {
|
||||
|
||||
WebhookSchema.set("removeResponse", ["source_channel_id", "source_guild_id"]);
|
||||
|
||||
// @ts-ignore
|
||||
export const WebhookModel = db.model<WebhookDocument>("Webhook", WebhookSchema, "webhooks");
|
||||
|
||||
+2
-1
@@ -1,6 +1,7 @@
|
||||
import { DOUBLE_WHITE_SPACE, SPECIAL_CHAR } from "./Regex";
|
||||
|
||||
export function trimSpecial(str?: string) {
|
||||
export function trimSpecial(str?: string): string {
|
||||
// @ts-ignore
|
||||
if (!str) return;
|
||||
return str.replace(SPECIAL_CHAR, "").replace(DOUBLE_WHITE_SPACE, " ").trim();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user