Remove unnecessary headers from service
This commit is contained in:
parent
5eea1133b9
commit
68eec30ecd
@ -1,7 +1,6 @@
|
||||
package com.uam.wmi.findmytutor.service;
|
||||
|
||||
import com.uam.wmi.findmytutor.model.Coordinate;
|
||||
import com.uam.wmi.findmytutor.model.JwtToken;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ -10,7 +9,6 @@ import retrofit2.Call;
|
||||
import retrofit2.http.Body;
|
||||
import retrofit2.http.DELETE;
|
||||
import retrofit2.http.GET;
|
||||
import retrofit2.http.Header;
|
||||
import retrofit2.http.POST;
|
||||
import retrofit2.http.PUT;
|
||||
import retrofit2.http.Path;
|
||||
@ -18,31 +16,31 @@ import retrofit2.http.Path;
|
||||
public interface Coordinates {
|
||||
|
||||
@GET("api/coordinates")
|
||||
Call<List<Coordinate>> getAllCoordinates(@Header("Authorization") JwtToken token);
|
||||
Call<List<Coordinate>> getAllCoordinates();
|
||||
|
||||
@GET("api/coordinates/{id}")
|
||||
Call<Coordinate> getCoordinatesById(@Path("id") String id, @Header("Authorization") JwtToken token);
|
||||
Call<Coordinate> getCoordinatesById(@Path("id") String id);
|
||||
|
||||
@GET("api/coordinates/user/{userId}")
|
||||
Call<List<Coordinate>> getCoordinatesByUserId(@Path("userId") String userId , @Header("Authorization") JwtToken token);
|
||||
Call<List<Coordinate>> getCoordinatesByUserId(@Path("userId") String userId);
|
||||
|
||||
@GET("api/coordinates/userTop/{userId}")
|
||||
Call<List<Coordinate>> getTopCoordinatesByUserId(@Path("userId") String userId , @Header("Authorization") JwtToken token);
|
||||
Call<List<Coordinate>> getTopCoordinatesByUserId(@Path("userId") String userId);
|
||||
|
||||
@GET("api/coordinates/top")
|
||||
Call<List<Coordinate>> getTopCoordinates();
|
||||
|
||||
@GET("api/coordinates/top/online")
|
||||
Call<List<Coordinate>> getOnlineCoordinates(@Header("Authorization") JwtToken token);
|
||||
Call<List<Coordinate>> getOnlineCoordinates();
|
||||
|
||||
@POST("api/coordinates")
|
||||
Call<ResponseBody> postCoordinate(@Body Coordinate coordinate, @Header("Authorization") JwtToken token);
|
||||
Call<ResponseBody> postCoordinate(@Body Coordinate coordinate);
|
||||
|
||||
@PUT("api/coordinates/{id}")
|
||||
Call<Coordinate> putCoordinatesById(@Path("id") String id, @Header("Authorization") JwtToken token);
|
||||
Call<Coordinate> putCoordinatesById(@Path("id") String id);
|
||||
|
||||
@DELETE("api/coordinates/{id}")
|
||||
Call<Coordinate> deleteCoordinatesById(@Path("id") String id, @Header("Authorization") JwtToken token);
|
||||
Call<Coordinate> deleteCoordinatesById(@Path("id") String id);
|
||||
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user