mirror of
https://github.com/Nezumi-2711/Foodify.git
synced 2026-09-22 20:00:50 +00:00
Change api search food enabled
This commit is contained in:
@@ -31,7 +31,7 @@ public interface FoodApi {
|
|||||||
Gson gson = new GsonBuilder().setDateFormat("HH:mm:ss dd-MM-yyyy").setLenient().create();
|
Gson gson = new GsonBuilder().setDateFormat("HH:mm:ss dd-MM-yyyy").setLenient().create();
|
||||||
|
|
||||||
FoodApi apiService = new Retrofit.Builder()
|
FoodApi apiService = new Retrofit.Builder()
|
||||||
.baseUrl("https://foodify-backend-production.up.railway.app/api/").addConverterFactory(GsonConverterFactory.create(gson))
|
.baseUrl("http://192.168.1.183:8080/api/").addConverterFactory(GsonConverterFactory.create(gson))
|
||||||
.build()
|
.build()
|
||||||
.create(FoodApi.class);
|
.create(FoodApi.class);
|
||||||
|
|
||||||
@@ -44,8 +44,8 @@ public interface FoodApi {
|
|||||||
@GET("shops/enable?pageNo=0&pageSize=10&sortBy=id&sortDir=asc")
|
@GET("shops/enable?pageNo=0&pageSize=10&sortBy=id&sortDir=asc")
|
||||||
Call<Shops> allShops();
|
Call<Shops> allShops();
|
||||||
|
|
||||||
@GET("products/search/{name}")
|
@GET("products/search/enable")
|
||||||
Call<Foods> searchFoodByName(@Path("name") String name, @Query("pageNo") int pageNo, @Query("pageSize") int pageSize, @Query("sortBy") String sortBy, @Query("sortDir") String sortDir);
|
Call<Foods> searchFoodByName(@Query("productName") String name, @Query("pageNo") int pageNo, @Query("pageSize") int pageSize, @Query("sortBy") String sortBy, @Query("sortDir") String sortDir);
|
||||||
|
|
||||||
@GET("products")
|
@GET("products")
|
||||||
Call<Foods> listFood(@Query("pageNo") int pageNo, @Query("pageSize") int pageSize, @Query("sortBy") String sortBy, @Query("sortDir") String sortDir);
|
Call<Foods> listFood(@Query("pageNo") int pageNo, @Query("pageSize") int pageSize, @Query("sortBy") String sortBy, @Query("sortDir") String sortDir);
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ public interface FoodApiToken {
|
|||||||
|
|
||||||
FoodApiToken apiService = new Retrofit.Builder()
|
FoodApiToken apiService = new Retrofit.Builder()
|
||||||
.client(client)
|
.client(client)
|
||||||
.baseUrl("https://foodify-backend-production.up.railway.app/api/").addConverterFactory(GsonConverterFactory.create(gson))
|
.baseUrl("http://192.168.1.183:8080/api/").addConverterFactory(GsonConverterFactory.create(gson))
|
||||||
.build()
|
.build()
|
||||||
.create(FoodApiToken.class);
|
.create(FoodApiToken.class);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user