From 3394c7612e94f96fdc77f2a3c99bae30ddc96528 Mon Sep 17 00:00:00 2001
From: Luis Felipe Risch <lfr20@inf.ufpr.br>
Date: Fri, 23 Oct 2020 12:28:19 -0300
Subject: [PATCH] Add a funtion to return a url encompassing all cases

---
 src/Admin/Filters.js | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/src/Admin/Filters.js b/src/Admin/Filters.js
index 54bfed6d..6b830f9f 100644
--- a/src/Admin/Filters.js
+++ b/src/Admin/Filters.js
@@ -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
-- 
GitLab