Fix: show journal

This commit is contained in:
Grail Finder
2025-07-08 10:05:36 +03:00
parent 7ed430d8d7
commit ce5d55cc13

View File

@ -131,5 +131,12 @@ func (p *RepoProvider) RoomGetExtended(ctx context.Context, id string) (*models.
return nil, err
}
room.Settings = *settings
// get log jounral
journals := []models.Journal{}
err = sqlx.SelectContext(ctx, p.DB, &journals, `SELECT id, created_at, entry, username, room_id FROM journal WHERE room_id = ? ORDER BY created_at ASC`, room.ID)
if err != nil {
return nil, err
}
room.LogJournal = journals
return room, nil
}