Fix: show journal
This commit is contained in:
@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user