chore: remove shorcut lower name

This commit is contained in:
Steven
2023-09-05 20:55:02 +08:00
parent 4f0a8cdc0a
commit 4a50248fbc
3 changed files with 4 additions and 8 deletions

View File

@ -92,7 +92,7 @@ func (s *APIV1Service) registerShortcutRoutes(g *echo.Group) {
shortcut := &storepb.Shortcut{
CreatorId: userID,
Name: strings.ToLower(create.Name),
Name: create.Name,
Link: create.Link,
Title: create.Title,
Description: create.Description,
@ -157,10 +157,6 @@ func (s *APIV1Service) registerShortcutRoutes(g *echo.Group) {
if err := json.NewDecoder(c.Request().Body).Decode(patch); err != nil {
return echo.NewHTTPError(http.StatusBadRequest, fmt.Sprintf("failed to decode patch shortcut request, err: %s", err)).SetInternal(err)
}
if patch.Name != nil {
name := strings.ToLower(*patch.Name)
patch.Name = &name
}
shortcutUpdate := &store.UpdateShortcut{
ID: shortcutID,