const std = @import("std"); const Context = @import("../../context.zig"); const Storage = @import("../../../storage/root.zig"); pub const access = .users; const ImageInfo = struct { id: []const u8, }; const Result = struct { images: []ImageInfo, }; pub fn get(ctx: *Context) !Result { var images: std.ArrayList(ImageInfo) = .empty; const images_list = ctx.storage.images.list(); defer images_list.deinit(); for (images_list.images) |*image| { try images.append(ctx.allocator, .{ .id = image.id }); } return .{ .images = try images.toOwnedSlice(ctx.allocator), }; }