╭ changed ────╮ │src/patch.zig│ ╰─────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭─────────────────────────────────────────────────────╮ │ 9 const fork = @import("fork.zig"); │ │10 const serve_common = @import("serve_common.zig");│ │11 │ │12 -pub const PostInput = struct { │ │12 +pub const PublishInput = struct { │ │13 id: [evt.event_id_size * 2]u8, │ │14 user_id: [evt.event_id_size]u8, │ │15 repo_id: [evt.event_id_size]u8, │ ╰─────────────────────────────────────────────────────╯ ╭──────────────────────────────────────────────╮ │26 timestamp: u64, │ │27 }; │ │28 │ │29 -pub fn post( │ │29 +pub fn publish( │ │30 comptime repo_opts: rp.RepoOpts(.xit),│ │31 io: std.Io, │ │32 allocator: std.mem.Allocator, │ ╰──────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────╮ │33 admin_repo: *rp.Repo(.xit, evt.admin_repo_opts), │ │34 target_repo: *rp.Repo(.xit, repo_opts), │ │35 path: []const u8, │ │36 - input: PostInput, │ │36 + input: PublishInput, │ │37 ) !void { │ │38 const patch_id = try evt.parseEventId(&input.id); │ │39 var arena = std.heap.ArenaAllocator.init(allocator);│ ╰────────────────────────────────────────────────────────────╯ ╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │92 } │ │93 │ │94 if (fork_record.event.stage == .draft) { │ │95 - var posted = fork_record.event; │ │96 - posted.stage = .posted; │ │95 + var published = fork_record.event; │ │96 + published.stage = .publish; │ │97 try evt.consume(.admin, .xit, evt.admin_repo_opts, io, allocator, admin_repo, evt.events_ref, &.{.{│ │98 .id = input.id, │ │99 .timestamp = input.timestamp, │ ╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────╮ │100 .author = input.author, │ │101 - .event = .{ .fork = posted }, │ │101 + .event = .{ .fork = published },│ │102 }}); │ │103 } │ │104 } │ ╰─────────────────────────────────────────────────╯