Skip to content

Commit

Permalink
Add GET Roles endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
index-git committed Dec 21, 2023
1 parent 0a51648 commit 73a6d0b
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions pages/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ const endpointToUrlPartGetter = {
'users': () => `/users`,
'version': () => `/about/version`,
'current-user': () => `/current-user`,
'roles': () => `/roles`,
}

const endpointToPathParams = {
Expand All @@ -95,6 +96,7 @@ const endpointToPathParams = {
'users': [],
'version': [],
'current-user': [],
'roles': [],
}

const endpointToPathParamsClass = {
Expand Down Expand Up @@ -177,6 +179,7 @@ const getEndpointParamsProps = (endpoint, component) => {
'users': {},
'version': {},
'current-user': {},
'roles': {},
}
return props[endpoint];
}
Expand Down Expand Up @@ -860,6 +863,21 @@ class IndexPage extends React.PureComponent {
</Table.Cell>
</Table.Row>

<Table.Row>
<Table.Cell>Roles</Table.Cell>
<Table.Cell><code>/rest/roles</code></Table.Cell>
<Table.Cell>
<Button
toggle
active={this.state.request === 'get-roles'}
onClick={this.setRequest.bind(this, 'get-roles')}
>GET</Button>
</Table.Cell>
<Table.Cell>x</Table.Cell>
<Table.Cell>x</Table.Cell>
<Table.Cell>x</Table.Cell>
</Table.Row>

<Table.Row>
<Table.Cell>Version</Table.Cell>
<Table.Cell><code>/rest/about/version</code></Table.Cell>
Expand Down

0 comments on commit 73a6d0b

Please sign in to comment.