fix type checking

This commit is contained in:
tsmethurst 2021-03-31 15:27:06 +02:00
parent 8014c9c5df
commit 11b18f986c
1 changed files with 1 additions and 1 deletions

View File

@ -39,7 +39,7 @@ func (m *accountModule) accountGETHandler(c *gin.Context) {
targetAccount := &model.Account{}
if err := m.db.GetByID(targetAcctID, targetAccount); err != nil {
if _, ok := err.(db.ErrNoEntries); !ok {
if _, ok := err.(db.ErrNoEntries); ok {
c.JSON(http.StatusNotFound, gin.H{"error":"Record not found"})
return
} else {