Skip to content

Commit

Permalink
Merge pull request #3589 from mathesar-foundation/remove_schemas_get
Browse files Browse the repository at this point in the history
Remove dead front end API client code to GET one schema
  • Loading branch information
seancolsen authored May 15, 2024
2 parents b585502 + 62ed17f commit 4e28306
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 28 deletions.
5 changes: 0 additions & 5 deletions mathesar_ui/src/api/rest/schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,6 @@ function list(connectionId: Connection['id']) {
);
}

function get(schemaId: SchemaEntry['id']) {
return getAPI<SchemaResponse>(`/api/db/v0/schemas/${schemaId}/`);
}

function add(props: {
name: SchemaEntry['name'];
description: SchemaEntry['description'];
Expand Down Expand Up @@ -48,7 +44,6 @@ function deleteSchema(schemaId: SchemaEntry['id']) {

export default {
list,
get,
add,
update,
delete: deleteSchema,
Expand Down
23 changes: 0 additions & 23 deletions mathesar_ui/src/stores/schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,29 +175,6 @@ async function refetchSchemasForDB(
}
}

export async function refetchSchema(
connectionId: Connection['id'],
schemaId: SchemaEntry['id'],
): Promise<SchemaResponse | undefined> {
const store = dbSchemaStoreMap.get(connectionId);
if (!store) {
console.error(`DB Schemas store for db: ${connectionId} not found.`);
return undefined;
}

try {
const schemaRequest = schemasApi.get(schemaId);
const response = await schemaRequest;
if (!response) {
return undefined;
}
updateSchemaInDBSchemaStore(connectionId, response);
return response;
} catch (err) {
return undefined;
}
}

let preload = true;

function getSchemasStoreForDB(
Expand Down

0 comments on commit 4e28306

Please sign in to comment.