Only select necessary columns in artists/albums/songs views
Some guy on GitHub said this is better lol
This commit is contained in:
parent
43e07901d6
commit
05e9c05742
4 changed files with 17 additions and 6 deletions
|
|
@ -4,7 +4,7 @@ const jetzig = @import("jetzig");
|
|||
pub fn index(request: *jetzig.Request) !jetzig.View {
|
||||
var root = try request.data(.object);
|
||||
var scrobbles_view = try root.put("scrobbles", .array);
|
||||
const query = jetzig.database.Query(.Scrobble).select(.{})
|
||||
const query = jetzig.database.Query(.Scrobble).select(.{.date})
|
||||
.include(.song, .{ .select = .{ .id, .name } })
|
||||
.include(.album, .{ .select = .{ .id, .name } })
|
||||
.include(.scrobbleartists, .{ .select = .{.artist_id} })
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue