Internal: Create sessionService.js to make API requests about sessions

pull/5156/head
Angel Fernando Quiroz Campos 10 months ago
parent 318ccc35a7
commit cf484fbfcc
  1. 5
      assets/vue/services/sessionService.js
  2. 6
      assets/vue/store/cidReq.js

@ -0,0 +1,5 @@
import { find } from "./baseService"
export default {
find
}

@ -1,7 +1,7 @@
import { defineStore } from "pinia"
import { usePlatformConfig } from "./platformConfig"
import courseService from "../services/course"
import sessionService from "../services/session"
import sessionService from "../services/sessionService"
import { computed, ref } from "vue"
export const useCidReqStore = defineStore("cidReq", () => {
@ -62,7 +62,9 @@ export const useCidReqStore = defineStore("cidReq", () => {
return
}
session.value = await sessionService.find(iri).then((response) => response.json())
const { data } = await sessionService.find(iri);
session.value = data
}
const setCourseAndSessionByIri = async (courseIri, sId = 0) => {

Loading…
Cancel
Save