je sais vraiment pas ce que j'ai ajouté mais amélioration jt'e jure
This commit is contained in:
@ -15,7 +15,7 @@ window.onhashchange = function() {
|
||||
}
|
||||
const Logged = ref(isLogged());
|
||||
|
||||
if(Logged){
|
||||
if(Logged.value){
|
||||
fetchNotifications();
|
||||
}
|
||||
|
||||
|
@ -15,7 +15,7 @@ import { fetchedPost, fetchPost, sendAnswer } from '@/rest/forum.js'
|
||||
import { getSelf } from '@/rest/Users.js'
|
||||
|
||||
const Role = (await getSelf()).role;
|
||||
const courses = Role === 'Admin' || Role === 'Secretary' ? await reactive(getCourses()) : await reactive(getUserActualCourses());
|
||||
const courses = Role === 'Admin' || Role === 'Secretary' || Role === 'Teacher' ? await reactive(getCourses(Role)) : await reactive(getUserActualCourses());
|
||||
const selectedCourse = ref();
|
||||
const selectedForum = ref();
|
||||
|
||||
|
@ -8,8 +8,6 @@ import { restGet, restPost, restDelete, restPatch } from './restConsumer.js'
|
||||
* Create a new course
|
||||
*/
|
||||
export async function createCourse(name, credits, owner){
|
||||
console.log(owner);
|
||||
|
||||
return restPost("/course", {title: name, credits: credits, owner} )
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
import { ref } from 'vue'
|
||||
import { restGet, restPost } from '@/rest/restConsumer.js'
|
||||
|
||||
export const notifications = ref({});
|
||||
export const notifications = ref([]);
|
||||
|
||||
export function fetchNotifications(){
|
||||
restGet("/notifications").then( e => notifications.value = e );
|
||||
|
Reference in New Issue
Block a user