fixed response type for post methods
This commit is contained in:
parent
ceeb62bcec
commit
4510b887cc
4
.gitignore
vendored
4
.gitignore
vendored
@ -41,7 +41,9 @@ captures/
|
|||||||
.idea/dictionaries
|
.idea/dictionaries
|
||||||
.idea/libraries
|
.idea/libraries
|
||||||
.idea/caches
|
.idea/caches
|
||||||
|
.idea/vcs.xml
|
||||||
|
.idea/workspace.xml
|
||||||
|
.idea/modules.xml
|
||||||
# Keystore files
|
# Keystore files
|
||||||
# Uncomment the following line if you do not want to check your keystore files in.
|
# Uncomment the following line if you do not want to check your keystore files in.
|
||||||
#*.jks
|
#*.jks
|
||||||
|
BIN
.idea/caches/build_file_checksums.ser
Normal file
BIN
.idea/caches/build_file_checksums.ser
Normal file
Binary file not shown.
@ -25,7 +25,7 @@
|
|||||||
</value>
|
</value>
|
||||||
</option>
|
</option>
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_8" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_1_7" project-jdk-name="1.8" project-jdk-type="JavaSDK">
|
||||||
<output url="file://$PROJECT_DIR$/build/classes" />
|
<output url="file://$PROJECT_DIR$/build/classes" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectType">
|
<component name="ProjectType">
|
||||||
|
@ -6,6 +6,7 @@ import com.uam.wmi.findmytutor.model.IsUsingListBool;
|
|||||||
import com.uam.wmi.findmytutor.model.StudentIdModel;
|
import com.uam.wmi.findmytutor.model.StudentIdModel;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
import okhttp3.ResponseBody;
|
||||||
import retrofit2.Call;
|
import retrofit2.Call;
|
||||||
import retrofit2.http.Body;
|
import retrofit2.http.Body;
|
||||||
import retrofit2.http.DELETE;
|
import retrofit2.http.DELETE;
|
||||||
@ -15,12 +16,13 @@ import retrofit2.http.POST;
|
|||||||
import retrofit2.http.Path;
|
import retrofit2.http.Path;
|
||||||
import retrofit2.http.Header;
|
import retrofit2.http.Header;
|
||||||
|
|
||||||
|
|
||||||
public interface UserService {
|
public interface UserService {
|
||||||
@GET("api/users")
|
@GET("api/users")
|
||||||
Call<List<User>> getAllUsers(@Header("Authorization") JwtToken token);
|
Call<List<User>> getAllUsers(@Header("Authorization") JwtToken token);
|
||||||
|
|
||||||
@POST("api/users")
|
@POST("api/users")
|
||||||
Call<List<User>> postAllUsers(@Header("Authorization") JwtToken token);
|
Call<ResponseBody> createUser(@Body User user,@Header("Authorization") JwtToken token);
|
||||||
|
|
||||||
@GET("api/users/page/{pageNum}")
|
@GET("api/users/page/{pageNum}")
|
||||||
Call<PagedResult> getPagedUsers(@Path("pageNum") String pageNum, @Header("Authorization") JwtToken token);
|
Call<PagedResult> getPagedUsers(@Path("pageNum") String pageNum, @Header("Authorization") JwtToken token);
|
||||||
@ -56,7 +58,7 @@ public interface UserService {
|
|||||||
Call<User> setTutorBlacklist(@Path("tutorID") String tutorID, @Body IsUsingListBool isUsing,@Header("Authorization") JwtToken token);
|
Call<User> setTutorBlacklist(@Path("tutorID") String tutorID, @Body IsUsingListBool isUsing,@Header("Authorization") JwtToken token);
|
||||||
|
|
||||||
@POST("api/users/blacklist/{tutorID}")
|
@POST("api/users/blacklist/{tutorID}")
|
||||||
Call<List<User>> addStudentToBlacklist(@Path("tutorID") String tutorID, @Body StudentIdModel student,@Header("Authorization") JwtToken token);
|
Call<ResponseBody> addStudentToBlacklist(@Path("tutorID") String tutorID, @Body StudentIdModel student,@Header("Authorization") JwtToken token);
|
||||||
|
|
||||||
@DELETE("api/users/blacklist/{tutorID}")
|
@DELETE("api/users/blacklist/{tutorID}")
|
||||||
Call<List<User>> removeStudentFromBlacklist(@Path("tutorID") String tutorID, @Body StudentIdModel student,@Header("Authorization") JwtToken token);
|
Call<List<User>> removeStudentFromBlacklist(@Path("tutorID") String tutorID, @Body StudentIdModel student,@Header("Authorization") JwtToken token);
|
||||||
@ -68,7 +70,7 @@ public interface UserService {
|
|||||||
Call<User> setTutorWhitelist(@Path("tutorID") String tutorID, @Body IsUsingListBool isUsing,@Header("Authorization") JwtToken token);
|
Call<User> setTutorWhitelist(@Path("tutorID") String tutorID, @Body IsUsingListBool isUsing,@Header("Authorization") JwtToken token);
|
||||||
|
|
||||||
@POST("api/users/whitelist/{tutorID}")
|
@POST("api/users/whitelist/{tutorID}")
|
||||||
Call<List<User>> addStudentTowhitelist(@Path("tutorID") String tutorID, @Body StudentIdModel student,@Header("Authorization") JwtToken token);
|
Call<ResponseBody> addStudentTowhitelist(@Path("tutorID") String tutorID, @Body StudentIdModel student,@Header("Authorization") JwtToken token);
|
||||||
|
|
||||||
@DELETE("api/users/whitelist/{tutorID}")
|
@DELETE("api/users/whitelist/{tutorID}")
|
||||||
Call<List<User>> removeStudentFromWhitelist(@Path("tutorID") String tutorID, @Body StudentIdModel student,@Header("Authorization") JwtToken token);
|
Call<List<User>> removeStudentFromWhitelist(@Path("tutorID") String tutorID, @Body StudentIdModel student,@Header("Authorization") JwtToken token);
|
||||||
|
Loading…
Reference in New Issue
Block a user