Skip to content

Commit b90b969

Browse files
committed
Ajout de la documentation pour les endpoints API dans AppController #57
1 parent 6e03e0c commit b90b969

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/app.controller.ts

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ export class AppController extends AbstractController {
1414
super();
1515
}
1616

17+
/**
18+
* This endpoint returns the API information.
19+
* It retrieves the package information from the AppService and returns it in the response.
20+
*/
1721
@Get()
1822
@ApiOperation({ summary: 'Get API infos' })
1923
@ApiResponse({ status: 200, description: 'Return API infos' })
@@ -23,6 +27,15 @@ export class AppController extends AbstractController {
2327
});
2428
}
2529

30+
/**
31+
* This endpoint checks for updates of the specified project.
32+
* It compares the current version with the latest version available on GitHub.
33+
* If the project is not the same as the package name or if a current version is provided,
34+
* it validates the current version format.
35+
* If the current version is not in the format X.Y.Z, it throws a BadRequestException.
36+
* It returns the project name, whether an update is available, the current version,
37+
* and the last version available.
38+
*/
2639
@ApiQuery({ name: 'current', required: false })
2740
@Get('/get-update/:project(sesame-orchestrator|sesame-daemon|sesame-app-manager)')
2841
public async update(

0 commit comments

Comments
 (0)