Skip to content
Snippets Groups Projects
Commit 3394c761 authored by lfr20's avatar lfr20
Browse files

Add a funtion to return a url encompassing all cases

parent 9bbbc921
No related branches found
No related tags found
4 merge requests!57Merge of develop into master,!56Fixed buttons reportar, seguir, compartilhar, guardar and entrar (in comments...,!40merge admin into develop,!37Merge sistema_admin into Update_Admin_System
......@@ -18,12 +18,17 @@ along with Plataforma Integrada MEC. If not, see <http://www.gnu.org/licenses/>
import { apiUrl } from '../env';
export function BuildFilter(typeOfFilter, type, filter) {
const api = `${apiUrl}/${type}?filter={"${typeOfFilter}": "${filter}"}&page=0&range=[0,9]&results_per_page=10&sort=["id","DESC"]`
export function Url(type, filter, page , sort) {
const api = `${apiUrl}/${type}?filter={${filter}}&page=${page}&range=[0,9]&results_per_page=10&sort=["id","DESC"]`
return (api)
}
export function WithoutFilter(type , page){
const api = `${apiUrl}/${type}?filter={}&page=${page}&range=[0,9]&results_per_page=10&sort=["id","DESC"]`
return (api)
}
export function EditFilter(type , id){
const api = `${apiUrl}/${type}/${id}`
return (api)
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment