mirror of
https://github.com/spacebarchat/server.git
synced 2024-11-11 13:14:06 +01:00
🐛 fix Webhook model
This commit is contained in:
parent
2c39b659a5
commit
d7cf341320
@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@fosscord/server-util",
|
||||
"version": "1.0.5",
|
||||
"version": "1.0.6",
|
||||
"description": "Utility functions for the all server repositories",
|
||||
"main": "dist/index.js",
|
||||
"types": "dist/index.d.ts",
|
||||
|
@ -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");
|
||||
|
@ -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();
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user