Add endpoint to get allowance history (#37)

Closes #12

Reviewed-on: #37
This commit is contained in:
2025-05-14 15:27:29 +02:00
parent 2486bbf1ec
commit 4355e1b1b7
8 changed files with 106 additions and 39 deletions

View File

@@ -60,6 +60,32 @@ paths:
description: The users could not be found.
/user/{userId}/allowance:
get:
summary: Gets the allowance history of a user
parameters:
- in: path
name: userId
description: The user ID
required: true
schema:
type: integer
responses:
200:
description: Information about the allowance history of the user
content:
application/json:
schema:
type: array
items:
type: object
properties:
date:
type: string
format: date-time
description: The date of the allowance or expense.
amount:
type: integer
description: The amount of the allowance to be added, in cents. A negative value
post:
summary: Updates the allowance of a user
parameters:
@@ -88,34 +114,6 @@ paths:
400:
description: The allowance could not be updated.
/user/{userId}/history:
get:
summary: Gets the allowance history of a user
parameters:
- in: path
name: userId
description: The user ID
required: true
schema:
type: integer
responses:
200:
description: Information about the allowance history of the user
content:
application/json:
schema:
type: array
items:
type: object
properties:
date:
type: string
format: date-time
description: The date of the allowance or expense.
amount:
type: integer
description: The amount of the allowance to be added, in cents. A negative value
/user/{userId}/goals:
get:
summary: Gets all goals