mirror of
https://github.com/tiddly-gittly/TidGi-Desktop.git
synced 2026-01-24 13:30:59 -08:00
fix: $:/info/tidgi/enableHTTPAPI not found
This commit is contained in:
parent
913a92925e
commit
49daa2937f
1 changed files with 4 additions and 1 deletions
|
|
@ -17,6 +17,9 @@ function getInfoTiddlerFields(updateInfoTiddlersCallback: (infos: Array<{ text:
|
|||
infoTiddlerFields.push({ title: '$:/info/tidgi', text: mapBoolean(isInTidGi) });
|
||||
if (isInTidGi && workspaceID) {
|
||||
infoTiddlerFields.push({ title: '$:/info/tidgi/workspaceID', text: workspaceID });
|
||||
/**
|
||||
* Push to asyncInfoTiddlerFields in this async function
|
||||
*/
|
||||
void window.service.workspace.get(workspaceID).then(async (workspace) => {
|
||||
if (workspace === undefined) return;
|
||||
const {
|
||||
|
|
@ -42,7 +45,7 @@ function getInfoTiddlerFields(updateInfoTiddlersCallback: (infos: Array<{ text:
|
|||
setLocationProperty('search', urlObject.search);
|
||||
setLocationProperty('origin', urlObject.origin);
|
||||
|
||||
infoTiddlerFields.push({ title: '$:/info/tidgi/tokenAuth', text: mapBoolean(tokenAuth) }, { title: '$:/info/tidgi/enableHTTPAPI', text: mapBoolean(enableHTTPAPI) });
|
||||
asyncInfoTiddlerFields.push({ title: '$:/info/tidgi/tokenAuth', text: mapBoolean(tokenAuth) }, { title: '$:/info/tidgi/enableHTTPAPI', text: mapBoolean(enableHTTPAPI) });
|
||||
if (tokenAuth) {
|
||||
const fallbackUserName = await window.service.auth.get('userName');
|
||||
const tokenAuthHeader = `"${getTidGiAuthHeaderWithToken(authToken ?? '')}": "${userName || fallbackUserName || ''}"`;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue