feat: category export and API cleanup.
This commit is contained in:
@@ -13,7 +13,7 @@ export async function getSession(id: string): Promise<GetSessionResponse> {
|
||||
const logEntries = await db
|
||||
.selectFrom("log_entries")
|
||||
.where("session_info_id", "=", id)
|
||||
.select(["id", "message", "timestamp"])
|
||||
.select(["id", "message", "timestamp", "category"])
|
||||
.orderBy("timestamp", "asc")
|
||||
.execute();
|
||||
|
||||
@@ -35,6 +35,7 @@ export async function getSession(id: string): Promise<GetSessionResponse> {
|
||||
log_entries: logEntries.map((entry) => ({
|
||||
message: entry.message,
|
||||
timestamp: entry.timestamp,
|
||||
category: entry.category,
|
||||
metadata: metadata
|
||||
.filter((m) => m.log_entry_id === entry.id)
|
||||
.reduce((acc, m) => ({ ...acc, [m.key]: m.value }), {}),
|
||||
|
||||
Reference in New Issue
Block a user