feat: Add legal requirements (#1306)
This commit is contained in:
@@ -13,10 +13,18 @@ const createAccessToken = (data, headers) =>
|
||||
const exchangeForAccessTokenWithOidc = (data, headers) =>
|
||||
http.post('/access-tokens/exchange-with-oidc?withHttpOnlyToken=true', data, headers);
|
||||
|
||||
// TODO: rename?
|
||||
const acceptTerms = (data, headers) => http.post('/access-tokens/accept-terms', data, headers);
|
||||
|
||||
const revokePendingToken = (data, headers) =>
|
||||
http.post('/access-tokens/revoke-pending-token', data, headers);
|
||||
|
||||
const deleteCurrentAccessToken = (headers) => http.delete('/access-tokens/me', undefined, headers);
|
||||
|
||||
export default {
|
||||
createAccessToken,
|
||||
exchangeForAccessTokenWithOidc,
|
||||
acceptTerms,
|
||||
revokePendingToken,
|
||||
deleteCurrentAccessToken,
|
||||
};
|
||||
|
||||
@@ -6,6 +6,7 @@
|
||||
import http from './http';
|
||||
import socket from './socket';
|
||||
import config from './config';
|
||||
import terms from './terms';
|
||||
import accessTokens from './access-tokens';
|
||||
import webhooks from './webhooks';
|
||||
import users from './users';
|
||||
@@ -35,6 +36,7 @@ export { http, socket };
|
||||
|
||||
export default {
|
||||
...config,
|
||||
...terms,
|
||||
...accessTokens,
|
||||
...webhooks,
|
||||
...users,
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
/*!
|
||||
* Copyright (c) 2024 PLANKA Software GmbH
|
||||
* Licensed under the Fair Use License: https://github.com/plankanban/planka/blob/master/LICENSE.md
|
||||
*/
|
||||
|
||||
import http from './http';
|
||||
|
||||
/* Actions */
|
||||
|
||||
const getTerms = (type, language, headers) =>
|
||||
http.get(`/terms/${type}${language ? `?language=${language}` : ''}`, undefined, headers);
|
||||
|
||||
export default {
|
||||
getTerms,
|
||||
};
|
||||
Reference in New Issue
Block a user