diff options
Diffstat (limited to 'internal/api/client/status')
-rw-r--r-- | internal/api/client/status/statusdelete.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/internal/api/client/status/statusdelete.go b/internal/api/client/status/statusdelete.go index e55416522..5c2a1aa32 100644 --- a/internal/api/client/status/statusdelete.go +++ b/internal/api/client/status/statusdelete.go @@ -56,5 +56,11 @@ func (m *Module) StatusDELETEHandler(c *gin.Context) { return } + // the status was already gone/never existed + if mastoStatus == nil { + c.JSON(http.StatusNotFound, gin.H{"error": "Record not found"}) + return + } + c.JSON(http.StatusOK, mastoStatus) } |