diff options
| author | mo khan <mo@mokhan.ca> | 2025-03-17 16:54:32 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2025-03-17 16:54:32 -0600 |
| commit | 2cf2473bc4cab2ffd1b826c16a3b5ea5dc0f950a (patch) | |
| tree | 331e18b2cf83869ab772338852a2647e87db47f5 /bin/api | |
| parent | 4d47f1b06f951337d122d3c45da408bcf9d9b523 (diff) | |
feat: add public groups endpoint
Diffstat (limited to 'bin/api')
| -rwxr-xr-x | bin/api | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -67,11 +67,14 @@ end class Organization < Entity class << self def default - @default ||= create!(id: SecureRandom.uuid) + @default ||= all.find { |organization| organization[:name] == "default" } end end end +class Group < Entity +end + class Project < Entity end @@ -134,6 +137,8 @@ class API case request.path when "/organizations", "/organizations.json" return json_ok(Organization.all.map(&:to_h)) + when "/groups", "/groups.json" + return json_ok(Group.all.map(&:to_h)) when "/projects", "/projects.json" resource = Organization.default if authorized?(request, :read_project, resource) |
