Skip to content

armgit / memos

Public Imported from GitHub
0

Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.

chore: fix linter

johnnyjoy9971cbeed486
diff --git a/server/router/api/v1/resource_name.go b/server/router/api/v1/resource_name.go
index 8a96dd8b6..1a2ee714a 100644
--- a/server/router/api/v1/resource_name.go
+++ b/server/router/api/v1/resource_name.go
@@ -144,19 +144,3 @@ func ExtractActivityIDFromName(name string) (int32, error) {
}
return id, nil
}
-
-// ExtractWebhookIDFromName returns the webhook ID from a resource name.
-func ExtractWebhookIDFromName(name string) (string, error) {
- tokens, err := GetNameParentTokens(name, UserNamePrefix, WebhookNamePrefix)
- if err != nil {
- return "", err
- }
- if len(tokens) != 2 {
- return "", errors.Errorf("invalid webhook name format: %q", name)
- }
- webhookID := tokens[1]
- if webhookID == "" {
- return "", errors.Errorf("invalid webhook ID %q", webhookID)
- }
- return webhookID, nil
-}