diff options
author | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2021-02-26 13:09:23 +0100 |
---|---|---|
committer | John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com> | 2021-05-30 10:28:56 +0200 |
commit | 9acea39cb94222c8d6e4a6c0f7d8dbac5055d1f4 (patch) | |
tree | e7dc41a2dee9cc9ed58254c09be246acd5ae6df7 /src/services | |
parent | fcba7ffa87471a75de015b57cb568acfc481273d (diff) |
Move Navigation to dedicated component
Signed-off-by: John Molakvoæ (skjnldsv) <skjnldsv@protonmail.com>
Diffstat (limited to 'src/services')
-rw-r--r-- | src/services/circles.js | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/services/circles.js b/src/services/circles.js new file mode 100644 index 00000000..93f48074 --- /dev/null +++ b/src/services/circles.js @@ -0,0 +1,34 @@ +/** + * @copyright Copyright (c) 2021 John Molakvoæ <skjnldsv@protonmail.com> + * + * @author John Molakvoæ <skjnldsv@protonmail.com> + * + * @license GNU AGPL version 3 or any later version + * + * This program is free software: you can redistribute it and/or modify + * it under the terms of the GNU Affero General Public License as + * published by the Free Software Foundation, either version 3 of the + * License, or (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU Affero General Public License for more details. + * + * You should have received a copy of the GNU Affero General Public License + * along with this program. If not, see <http://www.gnu.org/licenses/>. + * + */ + +import axios from '@nextcloud/axios' +import { generateOcsUrl } from '@nextcloud/router' + +const baseApi = generateOcsUrl('apps/circles') + +/** + * Get the circles list without the members + */ +export const getCircles = async function() { + const response = await axios.get(baseApi + 'circles') + return response.data.ocs.data +} |