feat: support empty content memo (#963)

feat: support empty-text memo
This commit is contained in:
Zeng1998
2023-01-17 20:56:57 +08:00
committed by GitHub
parent 288ecc617d
commit f8855ddb56
2 changed files with 6 additions and 10 deletions

View File

@@ -29,9 +29,6 @@ func (s *Server) registerMemoRoutes(g *echo.Group) {
if err := json.NewDecoder(c.Request().Body).Decode(memoCreate); err != nil {
return echo.NewHTTPError(http.StatusBadRequest, "Malformatted post memo request").SetInternal(err)
}
if memoCreate.Content == "" {
return echo.NewHTTPError(http.StatusBadRequest, "Memo content shouldn't be empty")
}
if memoCreate.Visibility == "" {
userSettingMemoVisibilityKey := api.UserSettingMemoVisibilityKey