Change api search food enabled

This commit is contained in:
Nezumi
2023-04-04 11:37:46 +07:00
parent 39c839a86a
commit e763d07c7e
2 changed files with 4 additions and 4 deletions
@@ -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);