mirror of
https://github.com/aykhans/slash-e.git
synced 2025-04-24 23:23:08 +00:00
chore: update shortcut name checks
This commit is contained in:
parent
fdee03cc99
commit
e9905cbc39
@ -102,6 +102,9 @@ func (s *APIV1Service) registerShortcutRoutes(g *echo.Group) {
|
|||||||
Tags: create.Tags,
|
Tags: create.Tags,
|
||||||
OgMetadata: &storepb.OpenGraphMetadata{},
|
OgMetadata: &storepb.OpenGraphMetadata{},
|
||||||
}
|
}
|
||||||
|
if create.Name == "" {
|
||||||
|
return echo.NewHTTPError(http.StatusBadRequest, "name is required")
|
||||||
|
}
|
||||||
if create.OpenGraphMetadata != nil {
|
if create.OpenGraphMetadata != nil {
|
||||||
shortcut.OgMetadata = &storepb.OpenGraphMetadata{
|
shortcut.OgMetadata = &storepb.OpenGraphMetadata{
|
||||||
Title: create.OpenGraphMetadata.Title,
|
Title: create.OpenGraphMetadata.Title,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user