Skip to content
GitLab
Explore
Projects
Groups
Topics
Snippets
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Register
Sign in
Toggle navigation
Menu
UPSMF
user-service
Commits
5f8f0374
Unverified
Commit
5f8f0374
authored
2 years ago
by
Chakshu Gautam
Committed by
GitHub
2 years ago
Browse files
Options
Download
Plain Diff
Merge pull request #36 from choxx/admin-console-application-support
parents
1231c0f5
111c9609
master
v2.4.4
v2.4.3
v2.4.2
v2.4.1
v2.4.0
v2.3.9
v2.3.8
v2.3.7
v2.3.6
v2.3.5
v2.3.4
v2.3.3.1
v2.3.3
v2.3.2
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/admin/admin.controller.ts
+6
-6
src/admin/admin.controller.ts
with
6 additions
and
6 deletions
+6
-6
src/admin/admin.controller.ts
+
6
−
6
View file @
5f8f0374
...
...
@@ -12,35 +12,35 @@ export class AdminController {
)
{}
@
Post
(
'
/all
'
)
@
Roles
(
'
Admin
'
,
'
school
'
)
@
Roles
(
'
Admin
'
,
'
school
'
,
'
State Admin
'
,
'
District Admin
'
,
'
Block Admin
'
,
'
School Admin
'
)
@
UseGuards
(
JwtAuthGuard
)
async
fetchUsers
(@
Request
()
req
,
@
Body
()
data
:
any
):
Promise
<
UsersResponse
>
{
return
await
this
.
adminService
.
fetchUsers
(
data
);
}
@
Post
(
'
/changePassword
'
)
@
Roles
(
'
Admin
'
,
'
school
'
)
@
Roles
(
'
Admin
'
,
'
school
'
,
'
State Admin
'
,
'
District Admin
'
,
'
Block Admin
'
,
'
School Admin
'
)
@
UseGuards
(
JwtAuthGuard
)
async
updatePassword
(@
Body
()
data
:
{
loginId
:
string
,
password
:
string
}):
Promise
<
SignupResponse
>
{
return
this
.
adminService
.
updatePassword
(
data
);
}
@
Post
(
'
/createUser
'
)
@
Roles
(
'
Admin
'
,
'
school
'
)
@
Roles
(
'
Admin
'
,
'
school
'
,
'
State Admin
'
,
'
District Admin
'
,
'
Block Admin
'
,
'
School Admin
'
)
@
UseGuards
(
JwtAuthGuard
)
async
createUser
(@
Body
()
data
:
UserRegistration
):
Promise
<
SignupResponse
>
{
return
await
this
.
adminService
.
createUser
(
data
);
}
@
Patch
(
'
/updateUser/:userId
'
)
@
Roles
(
'
Admin
'
,
'
school
'
)
@
Roles
(
'
Admin
'
,
'
school
'
,
'
State Admin
'
,
'
District Admin
'
,
'
Block Admin
'
,
'
School Admin
'
)
@
UseGuards
(
JwtAuthGuard
)
async
updateUser
(@
Param
(
'
userId
'
)
userId
:
string
,
@
Body
()
data
:
User
):
Promise
<
SignupResponse
>
{
return
await
this
.
adminService
.
updateUser
(
userId
,
data
);
}
@
Get
(
'
/searchUser
'
)
@
Roles
(
'
Admin
'
,
'
school
'
)
@
Roles
(
'
Admin
'
,
'
school
'
,
'
State Admin
'
,
'
District Admin
'
,
'
Block Admin
'
,
'
School Admin
'
)
@
UseGuards
(
JwtAuthGuard
)
async
searchUser
(@
Query
()
query
:
{
queryString
:
string
,
startRow
:
number
,
numberOfResults
:
number
}):
Promise
<
UsersResponse
>
{
console
.
log
(
query
.
numberOfResults
)
...
...
@@ -48,7 +48,7 @@ export class AdminController {
}
@
Get
(
'
/user/:userId
'
)
@
Roles
(
'
Admin
'
,
'
school
'
)
@
Roles
(
'
Admin
'
,
'
school
'
,
'
State Admin
'
,
'
District Admin
'
,
'
Block Admin
'
,
'
School Admin
'
)
@
UseGuards
(
JwtAuthGuard
)
async
searchUserbyId
(@
Param
(
'
userId
'
)
userId
:
string
):
Promise
<
UsersResponse
>
{
return
await
this
.
adminService
.
fetchUsersByString
(
userId
,
undefined
,
undefined
);
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Topics
Snippets