You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
30 lines
731 B
30 lines
731 B
import { ENTRYPOINT } from "../config/entrypoint"
|
|
import axios from "axios"
|
|
|
|
export default {
|
|
/**
|
|
* @param {Object} params
|
|
*/
|
|
getGlossaryTerms: async (params) => {
|
|
const response = await axios.get(ENTRYPOINT + "glossaries", { params })
|
|
return response.data
|
|
},
|
|
|
|
/**
|
|
* @param {Object} data
|
|
*/
|
|
exportToDocuments: async (data) => {
|
|
const endpoint = `${ENTRYPOINT}glossaries/export_to_documents`
|
|
const response = await axios.post(endpoint, data)
|
|
return response.data
|
|
},
|
|
|
|
/**
|
|
* @param {String|Number} termId
|
|
*/
|
|
deleteTerm: async (termId) => {
|
|
const endpoint = `${ENTRYPOINT}glossaries /${termId}`
|
|
const response = await axios.delete(endpoint)
|
|
return response.data
|
|
},
|
|
}
|
|
|