Skip to content

Commit

Permalink
fix(kong): update project list after data store creation
Browse files Browse the repository at this point in the history
  • Loading branch information
brucetony committed Aug 16, 2024
1 parent d53920f commit 7dc4b43
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 13 deletions.
5 changes: 2 additions & 3 deletions components/data-stores/ResourceManagerTabs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,7 @@ function updateDataStores(newDataStoreCreation: Service) {
name: newDataStoreCreation.name,
id: newDataStoreCreation.id,
};
availableDataStores.value = availableDataStores.value.push(newDataStoreEntry);
console.log(availableDataStores.value);
availableDataStores.value.push(newDataStoreEntry);
return;
}
</script>
Expand All @@ -58,7 +57,7 @@ function updateDataStores(newDataStoreCreation: Service) {
<div class="card tabCard">
<TabView>
<TabPanel header="Create a Data Store">
<DataStoreCreator @updatedRow="updateDataStores" />
<DataStoreCreator @newDataStore="updateDataStores" />
</TabPanel>
<TabPanel
header="Bind a Project to a Data Store"
Expand Down
6 changes: 0 additions & 6 deletions middleware/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,4 @@ export default defineNuxtRouteMiddleware(async (to) => {
console.warn("Not logged in");
return login();
}

if (Date.now() > Date.parse(user?.value.expireAt.toString())) {
console.warn("Token expired, routing to IDP");
await login();
navigateTo(to.path);
}
});
8 changes: 4 additions & 4 deletions plugins/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ export default defineNuxtPlugin((nuxtApp) => {
onResponseError({ request, response }) {
// Handle the response errors
console.log(response);
// if (response.status === 401 || response.status === 403) {
// console.warn("User not signed in, routing to login");
// return login();
// }
if (response.status === 401 || response.status === 403) {
console.warn("User not signed in, routing to login");
return login();
}

if (response.status === 500) {
if (typeof request === "string" && request.includes("kong")) {
Expand Down

0 comments on commit 7dc4b43

Please sign in to comment.