Skip to content

Commit

Permalink
Use tldraw config api
Browse files Browse the repository at this point in the history
  • Loading branch information
bischofmax committed Dec 11, 2024
1 parent dbe57d9 commit e8186a1
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions src/configuration/api/api.configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ const getConfigOptions = async (): Promise<{
CONFIG_PATH: string;
}> => {
const connectionOptions = {
CONFIG_PATH: configApiUrl(),
CONFIG_PATH: `/api/tldraw/config/public`,
};

if (import.meta.env.PROD) {
Expand All @@ -31,14 +31,6 @@ const getConfigOptions = async (): Promise<{
return connectionOptions;
};

const configApiUrl = () => {
const configApiUrl = import.meta.env.VITE_SERVER_TLDRAW_2_ENABLED
? `/api/tldraw/config/public`
: `/api/v3/config/public`;

return configApiUrl;
};

export const API = {
FILE_UPLOAD: "/api/v3/file/upload/school/SCHOOLID/boardnodes/CONTEXTID",
FILE_DELETE: "/api/v3/file/delete/FILERECORD_ID",
Expand Down

0 comments on commit e8186a1

Please sign in to comment.