19 lines
468 B
JavaScript
19 lines
468 B
JavaScript
|
|
import axios from "@nextcloud/axios";
|
|
import {generateUrl} from "@nextcloud/router";
|
|
export default {
|
|
async fetchAndCommitRoles(commit) {
|
|
try {
|
|
var url = '/apps/gestion/getUserConnectedGroups';
|
|
const ajaxUrl = generateUrl(url)
|
|
axios.get(ajaxUrl)
|
|
.then((response) => {
|
|
let roles = JSON.parse(response.data)
|
|
commit("setUserRole", roles);
|
|
})
|
|
.catch(error => {
|
|
});
|
|
} catch (error) {
|
|
}
|
|
},
|
|
}; |