dkforest

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

commit 5693eb2164377fcdb76a79f92b8df74df9f181a5
parent 958ebd84a63b7b7db068a04eccfd204b4d00967c
Author: n0tr1v <n0tr1v@protonmail.com>
Date:   Thu, 12 Jan 2023 15:36:17 -0800

move code

Diffstat:
Mpkg/database/tableChatRooms.go | 10+++++-----
1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/pkg/database/tableChatRooms.go b/pkg/database/tableChatRooms.go @@ -162,11 +162,6 @@ ORDER BY r.id ASC`, userID, userID, userID).Scan(&out).Error return } -func GetOfficialChatRooms() (out []ChatRoom, err error) { - err = DB.Where("id IN (1, 2, 3, 4, 14)").Preload("ReadRecord").Find(&out).Error - return -} - func GetListedChatRooms(userID UserID) (out []ChatRoomAug, err error) { err = DB.Raw(`SELECT r.*, u.*, @@ -183,6 +178,11 @@ ORDER BY r.id ASC`, userID, userID).Scan(&out).Error return } +func GetOfficialChatRooms() (out []ChatRoom, err error) { + err = DB.Where("id IN (1, 2, 3, 4, 14)").Preload("ReadRecord").Find(&out).Error + return +} + func DeleteOldPrivateChatRooms() { DB.Exec(`DELETE FROM chat_rooms WHERE owner_user_id IS NOT NULL