Skip to content

Commit

Permalink
Merge branch 'release/v1.3.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
namnhce committed May 21, 2024
2 parents e30c949 + 7e30ba1 commit b55730b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion pkg/handler/invoice/invoice.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ func (h *handler) Send(c *gin.Context) {

_, err = h.controller.Invoice.Send(iv)
if err != nil {
l.Error(err, "failed to parse request to invoice model")
l.Error(err, "failed to send invoice")
errs.ConvertControllerErr(c, err)
return
}
Expand Down
4 changes: 2 additions & 2 deletions pkg/store/discordaccount/discord_account.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ func (r *store) UpdateSelectedFieldsByID(db *gorm.DB, id string, updateModel mod
return &discordAccount, db.Model(&discordAccount).Where("id = ?", id).Select(updatedFields).Updates(updateModel).Error
}

// ListByMemoUsername gets a list of discord accounts by memo usernames
// ListByMemoUsername gets a list of discord accounts by memo usernames, if memo username is not found, it will try to find by discord username
func (r *store) ListByMemoUsername(db *gorm.DB, usernames []string) ([]model.DiscordAccount, error) {
var cms []model.DiscordAccount
err := db.Where("memo_username IN (?)", usernames).Find(&cms).Error
err := db.Where("memo_username IN (?) OR discord_username IN (?)", usernames, usernames).Find(&cms).Error
return cms, err
}

0 comments on commit b55730b

Please sign in to comment.