Skip to content

Commit 10998e0

Browse files
committed
Make base url configurable instead of port
1 parent abee5ef commit 10998e0

2 files changed

Lines changed: 5 additions & 5 deletions

File tree

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -758,11 +758,11 @@
758758
"required": false
759759
},
760760
{
761-
"name": "port",
762-
"title": "Port",
763-
"description": "The port number the Anytype API is running on.",
761+
"name": "apiUrl",
762+
"title": "API URL",
763+
"description": "The base URL of the Anytype API (default: http://127.0.0.1:31009).",
764764
"type": "textfield",
765-
"default": "31009",
765+
"default": "http://127.0.0.1:31009",
766766
"required": false
767767
}
768768
],

src/utils/constant.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export const anytypeNetwork = "N83gJpVd9MuNRZAuJLZ7LiMntTThhPc6DtzWWVjb1M3PouVU"
99
export const errorConnectionMessage = "Can't connect to API. Please ensure Anytype is running and reachable.";
1010

1111
// URLs
12-
export const apiUrl = `http://127.0.0.1:${getPreferenceValues().port}`;
12+
export const apiUrl = getPreferenceValues().apiUrl;
1313
export const downloadUrl = "https://download.anytype.io/";
1414
export const anytypeSpaceDeeplink = (spaceId: string) => `anytype://main/object/_blank_/space.id/${spaceId}`;
1515

0 commit comments

Comments
 (0)