fix serverurl in openapi docs for self hosted instance (#4390)
* fix serverurl in openapi docs for self hosted instance * fixed server url slash, moved calculation to enviroment function, fixed openapi path hardcoded api.twenty.com
This commit is contained in:
@ -48,10 +48,13 @@ const TokenForm = ({
|
||||
await submitToken(event.target.value);
|
||||
};
|
||||
|
||||
const updateBaseUrl = (baseUrl) => {
|
||||
setBaseUrl(baseUrl);
|
||||
submitBaseUrl?.(baseUrl);
|
||||
localStorage.setItem('baseUrl', JSON.stringify({ baseUrl: baseUrl }));
|
||||
const updateBaseUrl = (baseUrl: string) => {
|
||||
const url = baseUrl?.endsWith('/')
|
||||
? baseUrl.substring(0, baseUrl.length - 1)
|
||||
: baseUrl;
|
||||
setBaseUrl(url);
|
||||
submitBaseUrl?.(url);
|
||||
localStorage.setItem('baseUrl', JSON.stringify({ baseUrl: url }));
|
||||
};
|
||||
|
||||
const validateToken = (openApiJson) => {
|
||||
|
||||
Reference in New Issue
Block a user