Releases: Samagra-Development/user-service
Releases · Samagra-Development/user-service
v2.4.0
v2.3.9
v2.3.8
v2.3.7
v2.3.6 - User change account status (activate/deactivate)
Description
Added APIs to activate/deactivate user. (#43 )
Changes
PATCH admin/user/:userId/activate
PATCH admin/user/:userId/deactivate
PATCH api/user/:userId/activate
PATCH api/user/:userId/deactivate
v2.3.5
v2.3.4
v2.3.3
v2.3.2
v2.3.1
Description
This PR brings the enhancement to allow updating user's registration details along with support for updating 3rd party Hasura via config driven approach
Changes
- User's registration object can be patched
- 3rd party Hasura tables can be updated via config driven approach
PATCH /admin/updateUser/:userId
now accepts aregistrations
array in the request body:
...
"registrations": [
{
"applicationId": "xxxx",
"roles": [
"role 1",
"role 2",
"role nl"
],
"data": {
...
}
}
],
...
Checkout more on Fusion Auth docs, what all details can be passed in the array object: https://fusionauth.io/docs/v1/tech/apis/registrations#update-a-user-registration
PATCH /admin/updateUser/:userId
now accepts another array namedhasuraMutations
in the request body:
...
"hasuraMutations": [
{
"applicationId": "xxxx",
"mutation": "pre-defined mutation identifier as configured via generic API approach in `.env` file",
"payload": {
// payload needed by mutation
}
}
],
...
Generic config in the .env
file can be added like the example below:
APP_application_id_uuid='{
"host": "${FUSIONAUTH_BASE_URL}",
"hasura": {
"graphql_url": "http://example.com/v1/graphql",
"admin_secret": "my-hasura-admin-secret",
"mutations": {
"some-unique-mutation-identifier": "mutation someMutation($id: Int, $someKey: Int) {update_table(where: {id: {_eq: $id}}, _set: {some_key: $someKey}) {returning { id some_key } } }"
}
}
}'
Note: the value of the generic key APP_application_id_uuid must be a minified JSON. Example shown above is just for reference.