Commit 1f71800c authored by Khalid Ali's avatar Khalid Ali
Browse files

Fix some tslint errors

parent 26f0e320
Pipeline #4770 passed with stages
in 3 minutes and 16 seconds
......@@ -168,7 +168,7 @@ export default class CreateListing extends Vue {
// Get CSRF Token
API.get('/bs/api/').then((response) => {
console.log(response);
console.info(response);
const token = response.headers['x-csrf-token'];
if (response.headers['x-csrf-token'] != null) {
......@@ -204,9 +204,9 @@ export default class CreateListing extends Vue {
.catch(function(this: CreateListing, error) {
// Redirect to backend login
if (error.response === undefined || error.response.status === 403) {
//location.replace('https://localhost:9090/bs/api/login');
// location.replace('https://localhost:9090/bs/api/login');
}
console.log(error);
console.error(error);
});
}
......
......@@ -11,27 +11,22 @@ import { Component, Vue } from 'vue-property-decorator';
@Component
export default class LatestListing extends Vue {
private info:any = "";
private info: any = '';
private created() {
// Must be logged in
API.get('bs/api/listing/')
.then(response => (this.info = response))
.then((response) => (this.info = response))
.catch((error) => {
// Redirect to backend login
console.log(error);
console.error(error);
if (error.response === undefined || error.response.status === 403) {
location.replace('https://localhost:9090/bs/api/login');
console.log(error);
}
if (error.response.status === 404) {
API.get('bs/api/listing/');
}
});
}
}
</script>
\ No newline at end of file
</script>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment