dkforest

A forum and chat platform (onion)
git clone https://git.dasho.dev/n0tr1v/dkforest.git
Log | Files | Refs | LICENSE

commit 12ac6fbaefe89dbbc20ee8d6eb340ab085f8d52b
parent 65865b830fe0c0b20bebc9213935d64bbf951d61
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Sat,  4 Mar 2023 03:40:27 -0800

fix query

Diffstat:
Mpkg/database/tableChatRooms.go | 3++-
1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/pkg/database/tableChatRooms.go b/pkg/database/tableChatRooms.go @@ -186,7 +186,8 @@ ORDER BY r.id ASC`, userID, userID).Scan(&out).Error } func (d *DkfDB) GetOfficialChatRooms() (out []ChatRoom, err error) { - err = d.db.Where("id IN (1, 2, 3, 4, 14)").Preload("ReadRecord").Find(&out).Error + rooms := []string{"general", "club", "moderators"} + err = d.db.Where("name IN (?)", rooms).Find(&out).Error return }