chore: update docs links for nhost-js setRole and unsetRole methods (#2706)

This commit is contained in:
Hassan Ben Jobrane
2024-05-14 12:52:30 +01:00
committed by GitHub
parent 4c351714f5
commit 3cea460c36
2 changed files with 7 additions and 2 deletions

View File

@@ -0,0 +1,5 @@
---
'@nhost/nhost-js': patch
---
chore: update docs links for nhost-js setRole and unsetRole methods

View File

@@ -110,7 +110,7 @@ export class NhostClient {
* nhost.setRole('admin')
* ```
*
* @docs https://docs.nhost.io/reference/javascript/set-role
* @docs https://docs.nhost.io/reference/javascript/nhost-js/set-role
*/
setRole(role: string) {
this.graphql.setHeaders({ 'x-hasura-role': role })
@@ -130,7 +130,7 @@ export class NhostClient {
* nhost.unsetRole()
* ```
*
* @docs https://docs.nhost.io/reference/javascript/unset-role
* @docs https://docs.nhost.io/reference/javascript/nhost-js/unset-role
*/
unsetRole() {
this.graphql.setHeaders((({ 'x-hasura-role': _, ...rest }) => rest)(this.graphql.getHeaders()))