✨ Lookup now will ignore case to find sticker
This commit is contained in:
parent
241d61758a
commit
778d09d74a
@ -13,7 +13,7 @@ func GetStickerWithAlias(alias string) (models.Sticker, error) {
|
|||||||
prefix := viper.GetString("database.prefix")
|
prefix := viper.GetString("database.prefix")
|
||||||
if err := database.C.
|
if err := database.C.
|
||||||
Joins(fmt.Sprintf("LEFT JOIN %ssticker_packs pk ON pack_id = pk.id", prefix)).
|
Joins(fmt.Sprintf("LEFT JOIN %ssticker_packs pk ON pack_id = pk.id", prefix)).
|
||||||
Where("CONCAT(pk.prefix, alias) = ?", alias).
|
Where("UPPER(CONCAT(pk.prefix, alias)) = UPPER(?)", alias).
|
||||||
Preload("Attachment").Preload("Pack").
|
Preload("Attachment").Preload("Pack").
|
||||||
First(&sticker).Error; err != nil {
|
First(&sticker).Error; err != nil {
|
||||||
return sticker, err
|
return sticker, err
|
||||||
|
Loading…
Reference in New Issue
Block a user