Merge branch 'Max/Backend/GetUserById' into wal/front/listingUsers
This commit is contained in:
		@ -12,11 +12,7 @@ window.onhashchange = function() {
 | 
			
		||||
    prevURL = currentURL;
 | 
			
		||||
    currentURL = window.location.hash;
 | 
			
		||||
}
 | 
			
		||||
   console.log(location)
 | 
			
		||||
window.addEventListener('hashchange', () => {
 | 
			
		||||
		console.log(prevURL)
 | 
			
		||||
		console.log(location.hash)
 | 
			
		||||
		console.log(isLogged())
 | 
			
		||||
 if(location.hash === "#/home" && prevURL === "#/login"){
 | 
			
		||||
		window.location.reload();
 | 
			
		||||
 }
 | 
			
		||||
 | 
			
		||||
@ -2,7 +2,7 @@
 | 
			
		||||
  import i18n from "@/i18n.js"
 | 
			
		||||
  import {ref} from 'vue'
 | 
			
		||||
  import { getCourses,deleteCourse,alterCourse,createCourse } from "@/rest/courses.js"
 | 
			
		||||
  import {getSelf, getTeachers } from "@/rest/Users.js"
 | 
			
		||||
  import {getUser, getSelf, getTeachers } from "@/rest/Users.js"
 | 
			
		||||
  
 | 
			
		||||
  
 | 
			
		||||
  const self = await getSelf();
 | 
			
		||||
@ -108,7 +108,7 @@
 | 
			
		||||
        <div style="margin-bottom:20px;">
 | 
			
		||||
          {{i18n("Teacher")}} : 
 | 
			
		||||
         <select style="max-width:200px;" class="teacher" v-model="toAdd.owner">
 | 
			
		||||
           <option v-for="item in profList">{{item.regNo}}</option>
 | 
			
		||||
           <option v-for="item in profList">{{item}}</option>
 | 
			
		||||
        </select>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div style="margin-bottom:20px;">
 | 
			
		||||
 | 
			
		||||
@ -72,7 +72,7 @@ export async function createUser(firstname, lastname, birthDate, email, address,
 | 
			
		||||
 * if the user is not authenticated. then an empty array should be returned
 | 
			
		||||
 */
 | 
			
		||||
export async function getUser(id){
 | 
			
		||||
	const endpoint = "/user" + id != null ? "/" + id : "";
 | 
			
		||||
	const endpoint = "/user/" +  id;
 | 
			
		||||
	return restGet(endpoint);
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user