fix: error handling if nothing can be found

This commit is contained in:
SoXX 2024-07-11 13:32:42 +02:00
parent 1712cb512e
commit 1ce4fd93b9

View File

@ -192,7 +192,7 @@ func GetAllDmails(requestContext model.RequestContext, query map[string]string)
if err != nil {
// Log the error and return an empty slice and the error.
return nil, err
return []model.DMail{}, nil
}
// Return the list of posts and no error (nil).