feat: group statistics endpoint (#123)

* group statistics endpoint

* remove item store

* return possible errors

* add statistics tests
This commit is contained in:
Hayden 2022-11-01 13:58:05 -08:00 committed by GitHub
parent a886fa86ca
commit 7e0f1fac23
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 201 additions and 74 deletions

View file

@ -22,6 +22,17 @@ definitions:
updatedAt:
type: string
type: object
repo.GroupStatistics:
properties:
totalItems:
type: integer
totalLabels:
type: integer
totalLocations:
type: integer
totalUsers:
type: integer
type: object
repo.GroupUpdate:
properties:
currency:
@ -560,6 +571,20 @@ paths:
summary: Get the current user
tags:
- Group
/v1/groups/statistics:
get:
produces:
- application/json
responses:
"200":
description: OK
schema:
$ref: '#/definitions/repo.GroupStatistics'
security:
- Bearer: []
summary: Get the current user's group
tags:
- Group
/v1/items:
get:
parameters: