diff --git a/src/app/views/album.zig b/src/app/views/album.zig
new file mode 100644
index 0000000..9a7bc76
--- /dev/null
+++ b/src/app/views/album.zig
@@ -0,0 +1,104 @@
+const std = @import("std");
+const jetzig = @import("jetzig");
+
+pub fn index(request: *jetzig.Request) !jetzig.View {
+ return request.render(.ok);
+}
+
+pub fn get(id: []const u8, request: *jetzig.Request) !jetzig.View {
+ _ = id;
+ return request.render(.ok);
+}
+
+pub fn new(request: *jetzig.Request) !jetzig.View {
+ return request.render(.ok);
+}
+
+pub fn edit(id: []const u8, request: *jetzig.Request) !jetzig.View {
+ _ = id;
+ return request.render(.ok);
+}
+
+pub fn post(request: *jetzig.Request) !jetzig.View {
+ return request.render(.created);
+}
+
+pub fn put(id: []const u8, request: *jetzig.Request) !jetzig.View {
+ _ = id;
+ return request.render(.ok);
+}
+
+pub fn patch(id: []const u8, request: *jetzig.Request) !jetzig.View {
+ _ = id;
+ return request.render(.ok);
+}
+
+pub fn delete(id: []const u8, request: *jetzig.Request) !jetzig.View {
+ _ = id;
+ return request.render(.ok);
+}
+
+
+test "index" {
+ var app = try jetzig.testing.app(std.testing.allocator, @import("routes"));
+ defer app.deinit();
+
+ const response = try app.request(.GET, "/album", .{});
+ try response.expectStatus(.ok);
+}
+
+test "get" {
+ var app = try jetzig.testing.app(std.testing.allocator, @import("routes"));
+ defer app.deinit();
+
+ const response = try app.request(.GET, "/album/example-id", .{});
+ try response.expectStatus(.ok);
+}
+
+test "new" {
+ var app = try jetzig.testing.app(std.testing.allocator, @import("routes"));
+ defer app.deinit();
+
+ const response = try app.request(.GET, "/album/new", .{});
+ try response.expectStatus(.ok);
+}
+
+test "edit" {
+ var app = try jetzig.testing.app(std.testing.allocator, @import("routes"));
+ defer app.deinit();
+
+ const response = try app.request(.GET, "/album/example-id/edit", .{});
+ try response.expectStatus(.ok);
+}
+
+test "post" {
+ var app = try jetzig.testing.app(std.testing.allocator, @import("routes"));
+ defer app.deinit();
+
+ const response = try app.request(.POST, "/album", .{});
+ try response.expectStatus(.created);
+}
+
+test "put" {
+ var app = try jetzig.testing.app(std.testing.allocator, @import("routes"));
+ defer app.deinit();
+
+ const response = try app.request(.PUT, "/album/example-id", .{});
+ try response.expectStatus(.ok);
+}
+
+test "patch" {
+ var app = try jetzig.testing.app(std.testing.allocator, @import("routes"));
+ defer app.deinit();
+
+ const response = try app.request(.PATCH, "/album/example-id", .{});
+ try response.expectStatus(.ok);
+}
+
+test "delete" {
+ var app = try jetzig.testing.app(std.testing.allocator, @import("routes"));
+ defer app.deinit();
+
+ const response = try app.request(.DELETE, "/album/example-id", .{});
+ try response.expectStatus(.ok);
+}
diff --git a/src/app/views/album/delete.zmpl b/src/app/views/album/delete.zmpl
new file mode 100644
index 0000000..76457d0
--- /dev/null
+++ b/src/app/views/album/delete.zmpl
@@ -0,0 +1,3 @@
+
+ Content goes here
+
diff --git a/src/app/views/album/edit.zmpl b/src/app/views/album/edit.zmpl
new file mode 100644
index 0000000..76457d0
--- /dev/null
+++ b/src/app/views/album/edit.zmpl
@@ -0,0 +1,3 @@
+
+ Content goes here
+
diff --git a/src/app/views/album/get.zmpl b/src/app/views/album/get.zmpl
new file mode 100644
index 0000000..76457d0
--- /dev/null
+++ b/src/app/views/album/get.zmpl
@@ -0,0 +1,3 @@
+
+ Content goes here
+
diff --git a/src/app/views/album/index.zmpl b/src/app/views/album/index.zmpl
new file mode 100644
index 0000000..76457d0
--- /dev/null
+++ b/src/app/views/album/index.zmpl
@@ -0,0 +1,3 @@
+
+ Content goes here
+
diff --git a/src/app/views/album/new.zmpl b/src/app/views/album/new.zmpl
new file mode 100644
index 0000000..76457d0
--- /dev/null
+++ b/src/app/views/album/new.zmpl
@@ -0,0 +1,3 @@
+
+ Content goes here
+
diff --git a/src/app/views/album/patch.zmpl b/src/app/views/album/patch.zmpl
new file mode 100644
index 0000000..76457d0
--- /dev/null
+++ b/src/app/views/album/patch.zmpl
@@ -0,0 +1,3 @@
+
+ Content goes here
+
diff --git a/src/app/views/album/post.zmpl b/src/app/views/album/post.zmpl
new file mode 100644
index 0000000..76457d0
--- /dev/null
+++ b/src/app/views/album/post.zmpl
@@ -0,0 +1,3 @@
+
+ Content goes here
+
diff --git a/src/app/views/album/put.zmpl b/src/app/views/album/put.zmpl
new file mode 100644
index 0000000..76457d0
--- /dev/null
+++ b/src/app/views/album/put.zmpl
@@ -0,0 +1,3 @@
+
+ Content goes here
+
diff --git a/src/app/views/artist.zig b/src/app/views/artist.zig
new file mode 100644
index 0000000..1376cce
--- /dev/null
+++ b/src/app/views/artist.zig
@@ -0,0 +1,104 @@
+const std = @import("std");
+const jetzig = @import("jetzig");
+
+pub fn index(request: *jetzig.Request) !jetzig.View {
+ return request.render(.ok);
+}
+
+pub fn get(id: []const u8, request: *jetzig.Request) !jetzig.View {
+ _ = id;
+ return request.render(.ok);
+}
+
+pub fn new(request: *jetzig.Request) !jetzig.View {
+ return request.render(.ok);
+}
+
+pub fn edit(id: []const u8, request: *jetzig.Request) !jetzig.View {
+ _ = id;
+ return request.render(.ok);
+}
+
+pub fn post(request: *jetzig.Request) !jetzig.View {
+ return request.render(.created);
+}
+
+pub fn put(id: []const u8, request: *jetzig.Request) !jetzig.View {
+ _ = id;
+ return request.render(.ok);
+}
+
+pub fn patch(id: []const u8, request: *jetzig.Request) !jetzig.View {
+ _ = id;
+ return request.render(.ok);
+}
+
+pub fn delete(id: []const u8, request: *jetzig.Request) !jetzig.View {
+ _ = id;
+ return request.render(.ok);
+}
+
+
+test "index" {
+ var app = try jetzig.testing.app(std.testing.allocator, @import("routes"));
+ defer app.deinit();
+
+ const response = try app.request(.GET, "/artist", .{});
+ try response.expectStatus(.ok);
+}
+
+test "get" {
+ var app = try jetzig.testing.app(std.testing.allocator, @import("routes"));
+ defer app.deinit();
+
+ const response = try app.request(.GET, "/artist/example-id", .{});
+ try response.expectStatus(.ok);
+}
+
+test "new" {
+ var app = try jetzig.testing.app(std.testing.allocator, @import("routes"));
+ defer app.deinit();
+
+ const response = try app.request(.GET, "/artist/new", .{});
+ try response.expectStatus(.ok);
+}
+
+test "edit" {
+ var app = try jetzig.testing.app(std.testing.allocator, @import("routes"));
+ defer app.deinit();
+
+ const response = try app.request(.GET, "/artist/example-id/edit", .{});
+ try response.expectStatus(.ok);
+}
+
+test "post" {
+ var app = try jetzig.testing.app(std.testing.allocator, @import("routes"));
+ defer app.deinit();
+
+ const response = try app.request(.POST, "/artist", .{});
+ try response.expectStatus(.created);
+}
+
+test "put" {
+ var app = try jetzig.testing.app(std.testing.allocator, @import("routes"));
+ defer app.deinit();
+
+ const response = try app.request(.PUT, "/artist/example-id", .{});
+ try response.expectStatus(.ok);
+}
+
+test "patch" {
+ var app = try jetzig.testing.app(std.testing.allocator, @import("routes"));
+ defer app.deinit();
+
+ const response = try app.request(.PATCH, "/artist/example-id", .{});
+ try response.expectStatus(.ok);
+}
+
+test "delete" {
+ var app = try jetzig.testing.app(std.testing.allocator, @import("routes"));
+ defer app.deinit();
+
+ const response = try app.request(.DELETE, "/artist/example-id", .{});
+ try response.expectStatus(.ok);
+}
diff --git a/src/app/views/artist/delete.zmpl b/src/app/views/artist/delete.zmpl
new file mode 100644
index 0000000..76457d0
--- /dev/null
+++ b/src/app/views/artist/delete.zmpl
@@ -0,0 +1,3 @@
+
+ Content goes here
+
diff --git a/src/app/views/artist/edit.zmpl b/src/app/views/artist/edit.zmpl
new file mode 100644
index 0000000..76457d0
--- /dev/null
+++ b/src/app/views/artist/edit.zmpl
@@ -0,0 +1,3 @@
+
+ Content goes here
+
diff --git a/src/app/views/artist/get.zmpl b/src/app/views/artist/get.zmpl
new file mode 100644
index 0000000..76457d0
--- /dev/null
+++ b/src/app/views/artist/get.zmpl
@@ -0,0 +1,3 @@
+
+ Content goes here
+
diff --git a/src/app/views/artist/index.zmpl b/src/app/views/artist/index.zmpl
new file mode 100644
index 0000000..76457d0
--- /dev/null
+++ b/src/app/views/artist/index.zmpl
@@ -0,0 +1,3 @@
+
+ Content goes here
+
diff --git a/src/app/views/artist/new.zmpl b/src/app/views/artist/new.zmpl
new file mode 100644
index 0000000..76457d0
--- /dev/null
+++ b/src/app/views/artist/new.zmpl
@@ -0,0 +1,3 @@
+
+ Content goes here
+
diff --git a/src/app/views/artist/patch.zmpl b/src/app/views/artist/patch.zmpl
new file mode 100644
index 0000000..76457d0
--- /dev/null
+++ b/src/app/views/artist/patch.zmpl
@@ -0,0 +1,3 @@
+
+ Content goes here
+
diff --git a/src/app/views/artist/post.zmpl b/src/app/views/artist/post.zmpl
new file mode 100644
index 0000000..76457d0
--- /dev/null
+++ b/src/app/views/artist/post.zmpl
@@ -0,0 +1,3 @@
+
+ Content goes here
+
diff --git a/src/app/views/artist/put.zmpl b/src/app/views/artist/put.zmpl
new file mode 100644
index 0000000..76457d0
--- /dev/null
+++ b/src/app/views/artist/put.zmpl
@@ -0,0 +1,3 @@
+
+ Content goes here
+
diff --git a/src/app/views/scrobbles.zig b/src/app/views/scrobbles.zig
index 095f8a9..5ce68e9 100644
--- a/src/app/views/scrobbles.zig
+++ b/src/app/views/scrobbles.zig
@@ -7,12 +7,8 @@ pub fn index(request: *jetzig.Request, data: *jetzig.Data) !jetzig.View {
}
pub fn get(id: []const u8, request: *jetzig.Request, data: *jetzig.Data) !jetzig.View {
- var root = try request.data(.object);
- const params = try request.params();
- if (params.get("ar")) |param| {
- const artists = try jetzig.database.Query(.Artists).select(.{.id, .name});
- const
- }
+ _ = id;
+ _ = data;
return request.render(.ok);
}
diff --git a/src/app/views/search.zig b/src/app/views/search.zig
new file mode 100644
index 0000000..be5f7e0
--- /dev/null
+++ b/src/app/views/search.zig
@@ -0,0 +1,104 @@
+const std = @import("std");
+const jetzig = @import("jetzig");
+
+pub fn index(request: *jetzig.Request) !jetzig.View {
+ return request.render(.ok);
+}
+
+pub fn get(id: []const u8, request: *jetzig.Request) !jetzig.View {
+ _ = id;
+ return request.render(.ok);
+}
+
+pub fn new(request: *jetzig.Request) !jetzig.View {
+ return request.render(.ok);
+}
+
+pub fn edit(id: []const u8, request: *jetzig.Request) !jetzig.View {
+ _ = id;
+ return request.render(.ok);
+}
+
+pub fn post(request: *jetzig.Request) !jetzig.View {
+ return request.render(.created);
+}
+
+pub fn put(id: []const u8, request: *jetzig.Request) !jetzig.View {
+ _ = id;
+ return request.render(.ok);
+}
+
+pub fn patch(id: []const u8, request: *jetzig.Request) !jetzig.View {
+ _ = id;
+ return request.render(.ok);
+}
+
+pub fn delete(id: []const u8, request: *jetzig.Request) !jetzig.View {
+ _ = id;
+ return request.render(.ok);
+}
+
+
+test "index" {
+ var app = try jetzig.testing.app(std.testing.allocator, @import("routes"));
+ defer app.deinit();
+
+ const response = try app.request(.GET, "/search", .{});
+ try response.expectStatus(.ok);
+}
+
+test "get" {
+ var app = try jetzig.testing.app(std.testing.allocator, @import("routes"));
+ defer app.deinit();
+
+ const response = try app.request(.GET, "/search/example-id", .{});
+ try response.expectStatus(.ok);
+}
+
+test "new" {
+ var app = try jetzig.testing.app(std.testing.allocator, @import("routes"));
+ defer app.deinit();
+
+ const response = try app.request(.GET, "/search/new", .{});
+ try response.expectStatus(.ok);
+}
+
+test "edit" {
+ var app = try jetzig.testing.app(std.testing.allocator, @import("routes"));
+ defer app.deinit();
+
+ const response = try app.request(.GET, "/search/example-id/edit", .{});
+ try response.expectStatus(.ok);
+}
+
+test "post" {
+ var app = try jetzig.testing.app(std.testing.allocator, @import("routes"));
+ defer app.deinit();
+
+ const response = try app.request(.POST, "/search", .{});
+ try response.expectStatus(.created);
+}
+
+test "put" {
+ var app = try jetzig.testing.app(std.testing.allocator, @import("routes"));
+ defer app.deinit();
+
+ const response = try app.request(.PUT, "/search/example-id", .{});
+ try response.expectStatus(.ok);
+}
+
+test "patch" {
+ var app = try jetzig.testing.app(std.testing.allocator, @import("routes"));
+ defer app.deinit();
+
+ const response = try app.request(.PATCH, "/search/example-id", .{});
+ try response.expectStatus(.ok);
+}
+
+test "delete" {
+ var app = try jetzig.testing.app(std.testing.allocator, @import("routes"));
+ defer app.deinit();
+
+ const response = try app.request(.DELETE, "/search/example-id", .{});
+ try response.expectStatus(.ok);
+}
diff --git a/src/app/views/search/delete.zmpl b/src/app/views/search/delete.zmpl
new file mode 100644
index 0000000..76457d0
--- /dev/null
+++ b/src/app/views/search/delete.zmpl
@@ -0,0 +1,3 @@
+
+ Content goes here
+
diff --git a/src/app/views/search/edit.zmpl b/src/app/views/search/edit.zmpl
new file mode 100644
index 0000000..76457d0
--- /dev/null
+++ b/src/app/views/search/edit.zmpl
@@ -0,0 +1,3 @@
+
+ Content goes here
+
diff --git a/src/app/views/search/get.zmpl b/src/app/views/search/get.zmpl
new file mode 100644
index 0000000..76457d0
--- /dev/null
+++ b/src/app/views/search/get.zmpl
@@ -0,0 +1,3 @@
+
+ Content goes here
+
diff --git a/src/app/views/search/index.zmpl b/src/app/views/search/index.zmpl
new file mode 100644
index 0000000..76457d0
--- /dev/null
+++ b/src/app/views/search/index.zmpl
@@ -0,0 +1,3 @@
+
+ Content goes here
+
diff --git a/src/app/views/search/new.zmpl b/src/app/views/search/new.zmpl
new file mode 100644
index 0000000..76457d0
--- /dev/null
+++ b/src/app/views/search/new.zmpl
@@ -0,0 +1,3 @@
+
+ Content goes here
+
diff --git a/src/app/views/search/patch.zmpl b/src/app/views/search/patch.zmpl
new file mode 100644
index 0000000..76457d0
--- /dev/null
+++ b/src/app/views/search/patch.zmpl
@@ -0,0 +1,3 @@
+
+ Content goes here
+
diff --git a/src/app/views/search/post.zmpl b/src/app/views/search/post.zmpl
new file mode 100644
index 0000000..76457d0
--- /dev/null
+++ b/src/app/views/search/post.zmpl
@@ -0,0 +1,3 @@
+
+ Content goes here
+
diff --git a/src/app/views/search/put.zmpl b/src/app/views/search/put.zmpl
new file mode 100644
index 0000000..76457d0
--- /dev/null
+++ b/src/app/views/search/put.zmpl
@@ -0,0 +1,3 @@
+
+ Content goes here
+
diff --git a/src/app/views/song.zig b/src/app/views/song.zig
new file mode 100644
index 0000000..ae42cdc
--- /dev/null
+++ b/src/app/views/song.zig
@@ -0,0 +1,104 @@
+const std = @import("std");
+const jetzig = @import("jetzig");
+
+pub fn index(request: *jetzig.Request) !jetzig.View {
+ return request.render(.ok);
+}
+
+pub fn get(id: []const u8, request: *jetzig.Request) !jetzig.View {
+ _ = id;
+ return request.render(.ok);
+}
+
+pub fn new(request: *jetzig.Request) !jetzig.View {
+ return request.render(.ok);
+}
+
+pub fn edit(id: []const u8, request: *jetzig.Request) !jetzig.View {
+ _ = id;
+ return request.render(.ok);
+}
+
+pub fn post(request: *jetzig.Request) !jetzig.View {
+ return request.render(.created);
+}
+
+pub fn put(id: []const u8, request: *jetzig.Request) !jetzig.View {
+ _ = id;
+ return request.render(.ok);
+}
+
+pub fn patch(id: []const u8, request: *jetzig.Request) !jetzig.View {
+ _ = id;
+ return request.render(.ok);
+}
+
+pub fn delete(id: []const u8, request: *jetzig.Request) !jetzig.View {
+ _ = id;
+ return request.render(.ok);
+}
+
+
+test "index" {
+ var app = try jetzig.testing.app(std.testing.allocator, @import("routes"));
+ defer app.deinit();
+
+ const response = try app.request(.GET, "/song", .{});
+ try response.expectStatus(.ok);
+}
+
+test "get" {
+ var app = try jetzig.testing.app(std.testing.allocator, @import("routes"));
+ defer app.deinit();
+
+ const response = try app.request(.GET, "/song/example-id", .{});
+ try response.expectStatus(.ok);
+}
+
+test "new" {
+ var app = try jetzig.testing.app(std.testing.allocator, @import("routes"));
+ defer app.deinit();
+
+ const response = try app.request(.GET, "/song/new", .{});
+ try response.expectStatus(.ok);
+}
+
+test "edit" {
+ var app = try jetzig.testing.app(std.testing.allocator, @import("routes"));
+ defer app.deinit();
+
+ const response = try app.request(.GET, "/song/example-id/edit", .{});
+ try response.expectStatus(.ok);
+}
+
+test "post" {
+ var app = try jetzig.testing.app(std.testing.allocator, @import("routes"));
+ defer app.deinit();
+
+ const response = try app.request(.POST, "/song", .{});
+ try response.expectStatus(.created);
+}
+
+test "put" {
+ var app = try jetzig.testing.app(std.testing.allocator, @import("routes"));
+ defer app.deinit();
+
+ const response = try app.request(.PUT, "/song/example-id", .{});
+ try response.expectStatus(.ok);
+}
+
+test "patch" {
+ var app = try jetzig.testing.app(std.testing.allocator, @import("routes"));
+ defer app.deinit();
+
+ const response = try app.request(.PATCH, "/song/example-id", .{});
+ try response.expectStatus(.ok);
+}
+
+test "delete" {
+ var app = try jetzig.testing.app(std.testing.allocator, @import("routes"));
+ defer app.deinit();
+
+ const response = try app.request(.DELETE, "/song/example-id", .{});
+ try response.expectStatus(.ok);
+}
diff --git a/src/app/views/song/delete.zmpl b/src/app/views/song/delete.zmpl
new file mode 100644
index 0000000..76457d0
--- /dev/null
+++ b/src/app/views/song/delete.zmpl
@@ -0,0 +1,3 @@
+
+ Content goes here
+
diff --git a/src/app/views/song/edit.zmpl b/src/app/views/song/edit.zmpl
new file mode 100644
index 0000000..76457d0
--- /dev/null
+++ b/src/app/views/song/edit.zmpl
@@ -0,0 +1,3 @@
+
+ Content goes here
+
diff --git a/src/app/views/song/get.zmpl b/src/app/views/song/get.zmpl
new file mode 100644
index 0000000..76457d0
--- /dev/null
+++ b/src/app/views/song/get.zmpl
@@ -0,0 +1,3 @@
+
+ Content goes here
+
diff --git a/src/app/views/song/index.zmpl b/src/app/views/song/index.zmpl
new file mode 100644
index 0000000..76457d0
--- /dev/null
+++ b/src/app/views/song/index.zmpl
@@ -0,0 +1,3 @@
+
+ Content goes here
+
diff --git a/src/app/views/song/new.zmpl b/src/app/views/song/new.zmpl
new file mode 100644
index 0000000..76457d0
--- /dev/null
+++ b/src/app/views/song/new.zmpl
@@ -0,0 +1,3 @@
+
+ Content goes here
+
diff --git a/src/app/views/song/patch.zmpl b/src/app/views/song/patch.zmpl
new file mode 100644
index 0000000..76457d0
--- /dev/null
+++ b/src/app/views/song/patch.zmpl
@@ -0,0 +1,3 @@
+
+ Content goes here
+
diff --git a/src/app/views/song/post.zmpl b/src/app/views/song/post.zmpl
new file mode 100644
index 0000000..76457d0
--- /dev/null
+++ b/src/app/views/song/post.zmpl
@@ -0,0 +1,3 @@
+
+ Content goes here
+
diff --git a/src/app/views/song/put.zmpl b/src/app/views/song/put.zmpl
new file mode 100644
index 0000000..76457d0
--- /dev/null
+++ b/src/app/views/song/put.zmpl
@@ -0,0 +1,3 @@
+
+ Content goes here
+