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

Add a function to return the url of edit

parent 45651860
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
......@@ -19,16 +19,21 @@ along with Plataforma Integrada MEC. If not, see <http://www.gnu.org/licenses/>
import { apiUrl } from '../env';
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"]`
const api = `${apiUrl}/${type}?filter={${filter}}&page=${page}&range=[0,9]&results_per_page=10&sort=["id","${sort}"]`
return (api)
}
export function WithoutFilter(type , page){
const api = `${apiUrl}/${type}?filter={}&page=${page}&range=[0,9]&results_per_page=10&sort=["id","DESC"]`
export function GetOneOfAllUrl(type , filter){
const api = `${apiUrl}/${type}?filter={${filter}}`
return (api)
}
}
export function EditFilter(type , id){
const api = `${apiUrl}/${type}/${id}`
return (api)
}
export function DeleteFilter(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