@simitgroup/simpleapp-generator 2.0.0-b-alpha → 2.0.0-c-alpha

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/ReleaseNote.md CHANGED
@@ -1,3 +1,6 @@
1
+ [2.0.0c-alpha]
2
+ 1. fix profile session keeping error
3
+
1
4
  [2.0.0b-alpha]
2
5
  1. fix audit trail
3
6
  2. add patch many api
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simitgroup/simpleapp-generator",
3
- "version": "2.0.0b-alpha",
3
+ "version": "2.0.0c-alpha",
4
4
  "description": "frontend nuxtjs and backend nests code generator using jsonschema",
5
5
  "main": "dist/index.js",
6
6
  "scripts": {
@@ -43,26 +43,26 @@ export class ProfileController {
43
43
  }
44
44
  }
45
45
 
46
- // @Get('session')
47
- // @Roles(Role.Everyone, Role.User)
48
- // @ApiOperation({
49
- // operationId: 'getSession',
50
- // description: 'Get current user session',
51
- // })
52
- // @ApiResponse({
53
- // status: 200,
54
- // type: () => String,
55
- // description: 'Success',
56
- // })
57
- // @ApiResponse({ status: 401, type: Object, description: 'Expired' })
58
- // async getSession(@AppUser() appuser: UserContext) {
59
- // const result = await this.profileservice.getSession(appuser);
60
- // if (result) {
61
- // return result;
62
- // } else {
63
- // throw new HttpException('Forbidden', HttpStatus.FORBIDDEN);
64
- // }
65
- // }
46
+ @Get('session')
47
+ @Roles(Role.Everyone, Role.User)
48
+ @ApiOperation({
49
+ operationId: 'getSession',
50
+ description: 'Get current user session',
51
+ })
52
+ @ApiResponse({
53
+ status: 200,
54
+ type: () => String,
55
+ description: 'Success',
56
+ })
57
+ @ApiResponse({ status: 401, type: Object, description: 'Expired' })
58
+ async getSession(@AppUser() appuser: UserContext) {
59
+ const result = await this.profileservice.getSession(appuser);
60
+ if (result) {
61
+ return result;
62
+ } else {
63
+ throw new HttpException('Forbidden', HttpStatus.FORBIDDEN);
64
+ }
65
+ }
66
66
 
67
67
  @Get('/tenants')
68
68
  @Roles(Role.Everyone, Role.User)
@@ -90,7 +90,7 @@ export class ProfileController {
90
90
 
91
91
  @Post('/tenant')
92
92
  @Roles(Role.Everyone)
93
- @ApiBody({ description: 'create tenant name', type: RegTenant})
93
+ @ApiBody({ description: 'create tenant name', type: RegTenant })
94
94
  @ApiOperation({
95
95
  operationId: 'createTenant',
96
96
  description: 'create new tenant',