srctree

Gregory Mullen parent 3a4325fa e9ce53a2
add patch to api

src/api.zig added: 10, removed: 1, total 9
@@ -12,6 +12,7 @@ const endpoints = [_]routes.MatchRouter{
ROUTE("heartbeat", heartbeat),
ROUTE("issue", issue),
ROUTE("network", router),
ROUTE("patch", diff),
ROUTE("repo", repo),
ROUTE("user", user),
};
@@ -79,6 +80,14 @@ fn network(ctx: *Context) routes.Error!void {
return try ctx.sendJSON(Network{ .networks = [0].{} });
}
 
const Patch = struct {
patch: []const u8,
};
 
fn patch(ctx: *Context) routes.Error!void {
return try ctx.sendJSON(Patch{ .patch = [0].{} });
}
 
const Repo = struct {
name: []const u8,
head: []const u8,