mirror of
https://github.com/cubixle/vault.git
synced 2026-04-24 21:24:43 +01:00
make sure status codes are using http constants
This commit is contained in:
4
main.go
4
main.go
@@ -80,7 +80,7 @@ func createAction(c echo.Context) error {
|
||||
vault.Key = key
|
||||
vault.Vault = data
|
||||
|
||||
return c.JSON(200, vault)
|
||||
return c.JSON(http.StatusOK, vault)
|
||||
}
|
||||
|
||||
func decryptAction(c echo.Context) error {
|
||||
@@ -105,7 +105,7 @@ func decryptAction(c echo.Context) error {
|
||||
return c.JSON(http.StatusBadRequest, `{"error": "invalid time"}`)
|
||||
}
|
||||
|
||||
return c.JSON(200, item)
|
||||
return c.JSON(http.StatusOK, item)
|
||||
}
|
||||
|
||||
func generateUniqueID(length int) string {
|
||||
|
||||
Reference in New Issue
Block a user