mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2024-05-31 22:58:32 +00:00
fix type checking
This commit is contained in:
parent
8014c9c5df
commit
11b18f986c
|
@ -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 {
|
||||
|
|
Loading…
Reference in a new issue