updated Repository.js to use actual access token (interceptor)

This commit is contained in:
2019-04-15 14:16:53 +02:00
parent 98f5d3f39b
commit fccf120950
5 changed files with 82 additions and 35 deletions

View File

@@ -47,9 +47,9 @@
</template>
<script>
import { EventBus } from '@/utils'
import {getRemainingJwtValiditySeconds} from "../utils";
import { RepositoryFactory} from "@/api/RepositoryFactory";
import { EventBus } from '@/utils';
import {getRemainingJwtValiditySeconds} from '../utils';
import { RepositoryFactory} from '@/api/RepositoryFactory';
const UserRepository = RepositoryFactory.get('user');
export default {
@@ -60,7 +60,7 @@
errorMsg: '',
sortColumn: '',
currentPage: 1,
elementsPerPage: 5
elementsPerPage: 5,
};
},
methods: {
@@ -68,7 +68,7 @@
this.isLoading = true;
// const { data } = await GroupRepository.get();
UserRepository.getUsers()
.then(response => {
.then( (response) => {
this.users = response.data;
this.isLoading = false;
this.$log.debug(response);
@@ -76,8 +76,8 @@
},
get_rows() {
var start = (this.currentPage-1) * this.elementsPerPage;
var end = start + this.elementsPerPage;
let start = (this.currentPage-1) * this.elementsPerPage;
let end = start + this.elementsPerPage;
return this.users.slice(start, end);
},
num_pages() {
@@ -94,7 +94,7 @@
this.sortColumn = col;
}
var ascending = this.ascending;
let ascending = this.ascending;
this.users.sort(function(a, b) {
if (a[col] > b[col]) {