diff --git a/api/v1/shortcut.go b/api/v1/shortcut.go index 6600c66..8633973 100644 --- a/api/v1/shortcut.go +++ b/api/v1/shortcut.go @@ -102,6 +102,9 @@ func (s *APIV1Service) registerShortcutRoutes(g *echo.Group) { Tags: create.Tags, OgMetadata: &storepb.OpenGraphMetadata{}, } + if create.Name == "" { + return echo.NewHTTPError(http.StatusBadRequest, "name is required") + } if create.OpenGraphMetadata != nil { shortcut.OgMetadata = &storepb.OpenGraphMetadata{ Title: create.OpenGraphMetadata.Title,