Skip to content

Commit

Permalink
Improved: handling of login of flow(#14)
Browse files Browse the repository at this point in the history
  • Loading branch information
ymaheshwari1 committed Jan 15, 2024
1 parent 1ed611a commit a28cc02
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
5 changes: 3 additions & 2 deletions src/api/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ import { StatusCodes } from "http-status-codes";
import router from "@/router"

axios.interceptors.request.use((config: any) => {
// TODO: pass csrf token
const token = store.getters["user/getUserToken"];
if (token) {
config.headers.Authorization = "Bearer " + token;
config.headers["Content-Type"] = "application/x-www-form-urlencoded";
config.headers["api_key"] = token;
config.headers["Content-Type"] = "application/json";
}

return config;
Expand Down
1 change: 0 additions & 1 deletion src/store/modules/user/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ const actions: ActionTree<UserState, RootState> = {
console.error("error", err);

Check warning on line 36 in src/store/modules/user/actions.ts

View workflow job for this annotation

GitHub Actions / call-workflow-in-another-repo / reusable_workflow_job (18.x)

Unexpected console statement

Check warning on line 36 in src/store/modules/user/actions.ts

View workflow job for this annotation

GitHub Actions / call-workflow-in-another-repo / reusable_workflow_job (20.x)

Unexpected console statement
return Promise.reject(new Error(err))
}
// return resp
},

/**
Expand Down
4 changes: 2 additions & 2 deletions src/views/BrokeringRuns.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@
{{ "Description" }}
</ion-item>
<ion-item>
{{ "<Frequency>" }}
{{ "<Runtime>" }}
<ion-label>{{ "<Frequency>" }}</ion-label>
<ion-label slot="end">{{ "<Runtime>" }}</ion-label>
</ion-item>
<ion-item>
{{ "Created at <time>" }}
Expand Down
2 changes: 1 addition & 1 deletion src/views/Login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ export default defineComponent({
this.password = ""
this.$router.push("/")
}
})
}).catch(err => err)
}
},
setup() {
Expand Down

0 comments on commit a28cc02

Please sign in to comment.