Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
O
OpenQuizz
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
10
Issues
10
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Weber Rodolphe
OpenQuizz
Commits
01f8a16f
Commit
01f8a16f
authored
Jun 30, 2021
by
Jérémie Passerat
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Changement d'un appel ws
parent
67c14f77
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
30 deletions
+39
-30
Filtre_Auteur.vue
src/components/filtres/Filtre_Auteur.vue
+7
-5
Service.js
src/service/Service.js
+32
-25
No files found.
src/components/filtres/Filtre_Auteur.vue
View file @
01f8a16f
...
...
@@ -34,11 +34,13 @@ export default {
else
{
return
this
.
listeAuteurs
}
}
},
mounted
()
{
let
that
=
this
Service
.
recupererAuteursExistants
().
then
(
function
(
reponse
)
{
that
.
listeAuteurs
=
reponse
.
data
})
watch
:{
auteurChoisi
:
function
()
{
let
that
=
this
Service
.
recupererAuteursExistants
().
then
(
function
(
reponse
)
{
that
.
listeAuteurs
=
reponse
.
data
})
}
},
data
:
function
()
{
return
{
...
...
src/service/Service.js
View file @
01f8a16f
import
axios
from
'axios'
const
urlBase
=
"http://127.0.0.1:5000/"
//const urlBase = "http://193.70.2.155:5000/"
const
users
=
"utilisateurs/"
const
contenus
=
"contenus/"
const
en_cours
=
"en_cours/"
const
demande_pub
=
"demande_pub/"
//const evaluation = "evaluation/
const
header
=
{
headers
:
{
Authorization
:
"Bearer "
+
localStorage
.
token
,
}
}
export
default
{
// gestion des utilisateurs
...
...
@@ -17,98 +24,98 @@ export default {
axios.get(urlBase + "checkUser?login=" + login + "&password=" + motDePasse).then(function (response) {
reponse = response.data
})*/
return
axios
.
get
(
urlBase
+
users
+
"checkUser?login="
+
login
+
"&password="
+
motDePasse
)
return
axios
.
get
(
urlBase
+
users
+
"checkUser?login="
+
login
+
"&password="
+
motDePasse
,
header
)
},
recupererAuteursExistants
(){
return
axios
.
get
(
urlBase
+
users
+
"auteursExistants"
)
return
axios
.
get
(
urlBase
+
users
+
"auteursExistants"
,
header
)
},
// gestion des contenus
creerContenuPerso
(
data
)
{
return
axios
.
post
(
urlBase
+
contenus
+
"addContenu"
,
data
)
return
axios
.
post
(
urlBase
+
contenus
+
"addContenu"
,
data
,
header
)
},
creerContenuTiers
(
data
)
{
return
axios
.
patch
(
urlBase
+
contenus
+
"ajouterTiers"
,
data
)
return
axios
.
patch
(
urlBase
+
contenus
+
"ajouterTiers"
,
data
,
header
)
},
/* getContenuById(idContenu) {
return axios.get(urlBase + contenus + "getContenu/" + idContenu)
},*/
getPanierAuteur
(
auteur
)
{
return
axios
.
get
(
urlBase
+
contenus
+
"getContenuPanier/"
+
auteur
+
"?perso=True&tiers=True&enCours=true"
)
return
axios
.
get
(
urlBase
+
contenus
+
"getContenuPanier/"
+
auteur
+
"?perso=True&tiers=True&enCours=true"
,
header
)
},
getBanqueAuteur
(
auteur
)
{
return
axios
.
get
(
urlBase
+
contenus
+
"getContenuBanque/"
+
auteur
)
return
axios
.
get
(
urlBase
+
contenus
+
"getContenuBanque/"
+
auteur
,
header
)
},
supprimerContenu
(
idContenu
)
{
return
axios
.
delete
(
urlBase
+
contenus
+
"deletePerso/"
+
idContenu
)
return
axios
.
delete
(
urlBase
+
contenus
+
"deletePerso/"
+
idContenu
,
header
)
},
supprimerTiers
(
auteur
,
id_tiers
)
{
return
axios
.
delete
(
urlBase
+
contenus
+
"deleteTiers?auteur="
+
auteur
+
"&id_tiers="
+
id_tiers
)
return
axios
.
delete
(
urlBase
+
contenus
+
"deleteTiers?auteur="
+
auteur
+
"&id_tiers="
+
id_tiers
,
header
)
},
creerNouveauContenu
(
data
)
{
return
axios
.
post
(
urlBase
+
contenus
+
"newContenu"
,
data
)
return
axios
.
post
(
urlBase
+
contenus
+
"newContenu"
,
data
,
header
)
},
majContenu
(
data
)
{
return
axios
.
patch
(
urlBase
+
contenus
+
"majContenu"
,
data
)
return
axios
.
patch
(
urlBase
+
contenus
+
"majContenu"
,
data
,
header
)
},
gererDemandePublication
(
data
)
{
return
axios
.
patch
(
urlBase
+
contenus
+
"gererDemandePub"
,
data
)
return
axios
.
patch
(
urlBase
+
contenus
+
"gererDemandePub"
,
data
,
header
)
},
isMajTiersDisponible
(
auteur
)
{
return
axios
.
get
(
urlBase
+
contenus
+
"isMajTiersDisponible/"
+
auteur
)
return
axios
.
get
(
urlBase
+
contenus
+
"isMajTiersDisponible/"
+
auteur
,
header
)
},
listeMajTiers
(
auteur
)
{
return
axios
.
get
(
urlBase
+
contenus
+
"listeMajTiers/"
+
auteur
)
return
axios
.
get
(
urlBase
+
contenus
+
"listeMajTiers/"
+
auteur
,
header
)
},
gererMajTiers
(
data
)
{
return
axios
.
patch
(
urlBase
+
contenus
+
"gererMajTiers"
,
data
)
return
axios
.
patch
(
urlBase
+
contenus
+
"gererMajTiers"
,
data
,
header
)
},
changerTexte
(
data
,
id
)
{
return
axios
.
patch
(
urlBase
+
contenus
+
"changerTexte/"
+
id
,
data
)
return
axios
.
patch
(
urlBase
+
contenus
+
"changerTexte/"
+
id
,
data
,
header
)
},
recupererTexteContenu
(
idContenu
){
return
axios
.
get
(
urlBase
+
contenus
+
"getTexteContenu/"
+
idContenu
)
return
axios
.
get
(
urlBase
+
contenus
+
"getTexteContenu/"
+
idContenu
,
header
)
},
recupererTexteVersionContenu
(
idContenu
,
version
){
return
axios
.
get
(
urlBase
+
"getTexteVersionContenu/"
+
idContenu
+
"/"
+
version
)
return
axios
.
get
(
urlBase
+
"getTexteVersionContenu/"
+
idContenu
+
"/"
+
version
,
header
)
},
// gestion des en-cours
creerEnCours
(
data
)
{
return
axios
.
post
(
urlBase
+
en_cours
+
"newEnCours"
,
data
)
return
axios
.
post
(
urlBase
+
en_cours
+
"newEnCours"
,
data
,
header
)
},
creerEnCoursRefuse
(
data
)
{
return
axios
.
patch
(
urlBase
+
en_cours
+
"newEnCoursRefuse"
,
data
)
return
axios
.
patch
(
urlBase
+
en_cours
+
"newEnCoursRefuse"
,
data
,
header
)
},
supprimerEnCoursParLid
(
idEnCours
)
{
return
axios
.
delete
(
urlBase
+
en_cours
+
"supprimerEnCoursParId/"
+
idEnCours
)
return
axios
.
delete
(
urlBase
+
en_cours
+
"supprimerEnCoursParId/"
+
idEnCours
,
header
)
},
recupererTexteContenuEnCours
(
idContenu
){
return
axios
.
get
(
urlBase
+
en_cours
+
"getTexteContenuEnCours/"
+
idContenu
)
return
axios
.
get
(
urlBase
+
en_cours
+
"getTexteContenuEnCours/"
+
idContenu
,
header
)
},
// gestion des demandes de publication
getPublicationsRecues
(
auteur
)
{
return
axios
.
get
(
urlBase
+
demande_pub
+
"demandePublication/"
+
auteur
+
"/False"
)
return
axios
.
get
(
urlBase
+
demande_pub
+
"demandePublication/"
+
auteur
+
"/False"
,
header
)
},
getPublicationsProposees
(
auteur
)
{
return
axios
.
get
(
urlBase
+
demande_pub
+
"demandePublication/"
+
auteur
+
"/True"
)
return
axios
.
get
(
urlBase
+
demande_pub
+
"demandePublication/"
+
auteur
+
"/True"
,
header
)
},
creerDemandePublication
(
data
)
{
return
axios
.
post
(
urlBase
+
demande_pub
+
"demandePublication"
,
data
)
return
axios
.
post
(
urlBase
+
demande_pub
+
"demandePublication"
,
data
,
header
)
},
supprimerDemandePublication
(
idDemandePublication
)
{
return
axios
.
delete
(
urlBase
+
demande_pub
+
"demandePublication/"
+
idDemandePublication
)
return
axios
.
delete
(
urlBase
+
demande_pub
+
"demandePublication/"
+
idDemandePublication
,
header
)
},
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment