╭ changed ────╮ │src/event.zig│ ╰─────────────╯ ╭───────────╮ │← all files│ ╰───────────╯ ╭──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │68 } │ │69 │ │70 // a repo's path, inside its owner's dir │ │71 -pub fn repoPath(allocator: std.mem.Allocator, users_dir: []const u8, owner_id: []const u8, repo_id: []const u8) ![]u8 { │ │72 - return try std.Io.Dir.path.join(allocator, &.{ users_dir, &std.fmt.bytesToHex(owner_id[0..event_id_size].*, .lower), "repos", &std.fmt.bytesToHex(repo_id[0..event_id_size].*, .lower) });│ │71 +pub fn repoPath(allocator: std.mem.Allocator, users_dir: []const u8, owner_id: *const [event_id_size]u8, repo_id: *const [event_id_size]u8) ![]u8 { │ │72 + return try std.Io.Dir.path.join(allocator, &.{ users_dir, &std.fmt.bytesToHex(owner_id.*, .lower), "repos", &std.fmt.bytesToHex(repo_id.*, .lower) }); │ │73 } │ │74 │ │75 // the ids a repo path names, or null for a path `repoPath` didn't build │ ╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ │2145 .id = std.fmt.bytesToHex(Grant.idOf(repo_id, user_id), .lower), │ │2146 .timestamp = @intCast(std.Io.Timestamp.now(io, .real).toSeconds()), │ │2147 .author = author, │ │2148 - .event = .{ .grant = .{ .target_id = repo_id, .user_id = user_id, .role = role } }, │ │2148 + .event = .{ .grant = .{ .target_id = std.fmt.bytesToHex(repo_id.*, .lower), .user_id = std.fmt.bytesToHex(user_id.*, .lower), .role = role } },│ │2149 }}); │ │2150 } │ │2151 │ ╰─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ ╭────────────────────────────────────────────────────────────────────╮ │2278 .timestamp = timestamp, │ │2279 .author = owner, │ │2280 .event = .{ .repo = .{ │ │2281 - .user_id = owner_id, │ │2281 + .user_id = std.fmt.bytesToHex(owner_id.*, .lower),│ │2282 .name = name, │ │2283 .description = description, │ │2284 .read_access = read_access, │ ╰────────────────────────────────────────────────────────────────────╯