Skip to content

Commit 2222a99

Browse files
committed
fix listDatabaseNames endpoing
1 parent bdd2f5f commit 2222a99

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

packages/fmodata/src/client/filemaker-odata.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -318,14 +318,9 @@ export class FMServerConnection implements ExecutionContext {
318318
* @returns Promise resolving to an array of database names
319319
*/
320320
async listDatabaseNames(): Promise<string[]> {
321-
if ("apiKey" in this.auth) {
322-
this.logger.error(
323-
"listDatabaseNames not supported with API key authentication. OttoFMS requires that the API only be used with the database for which it was created",
324-
);
325-
}
326321
const result = await this._makeRequest<{
327322
value?: Array<{ name: string }>;
328-
}>("/");
323+
}>("/$metadata", { headers: { Accept: "application/json" } });
329324
if (result.error) {
330325
throw result.error;
331326
}

0 commit comments

Comments
 (0)