mirror of
https://github.com/Nezumi-2711/Foodify.git
synced 2026-09-22 20:00:50 +00:00
Show list favorite from api
This commit is contained in:
@@ -12,7 +12,10 @@ import java.util.List;
|
||||
import retrofit2.Call;
|
||||
import retrofit2.Retrofit;
|
||||
import retrofit2.converter.gson.GsonConverterFactory;
|
||||
import retrofit2.http.Body;
|
||||
import retrofit2.http.DELETE;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.POST;
|
||||
import retrofit2.http.Path;
|
||||
import retrofit2.http.Query;
|
||||
|
||||
@@ -55,4 +58,13 @@ public interface FoodApi {
|
||||
|
||||
@GET("district")
|
||||
Call<List<DistrictWardResponse>> districtResponse();
|
||||
|
||||
@GET("wishlist")
|
||||
Call<List<Food>> getListFavoriteFood();
|
||||
|
||||
@POST("wishlist")
|
||||
Call<Food> addFoodToFavorite(@Body Food food);
|
||||
|
||||
@DELETE("wishlist/{id}")
|
||||
Call<Food> removeFoodFromFavorite(@Path("id") int id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user