fixed response type for post methods
This commit is contained in:
parent
ceeb62bcec
commit
4510b887cc
6
.gitignore
vendored
6
.gitignore
vendored
@ -41,7 +41,9 @@ captures/
|
||||
.idea/dictionaries
|
||||
.idea/libraries
|
||||
.idea/caches
|
||||
|
||||
.idea/vcs.xml
|
||||
.idea/workspace.xml
|
||||
.idea/modules.xml
|
||||
# Keystore files
|
||||
# Uncomment the following line if you do not want to check your keystore files in.
|
||||
#*.jks
|
||||
@ -62,4 +64,4 @@ fastlane/report.xml
|
||||
fastlane/Preview.html
|
||||
fastlane/screenshots
|
||||
fastlane/test_output
|
||||
fastlane/readme.md
|
||||
fastlane/readme.md
|
||||
|
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>
|
||||
</option>
|
||||
</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" />
|
||||
</component>
|
||||
<component name="ProjectType">
|
||||
|
@ -6,6 +6,7 @@ import com.uam.wmi.findmytutor.model.IsUsingListBool;
|
||||
import com.uam.wmi.findmytutor.model.StudentIdModel;
|
||||
import java.util.List;
|
||||
|
||||
import okhttp3.ResponseBody;
|
||||
import retrofit2.Call;
|
||||
import retrofit2.http.Body;
|
||||
import retrofit2.http.DELETE;
|
||||
@ -15,12 +16,13 @@ import retrofit2.http.POST;
|
||||
import retrofit2.http.Path;
|
||||
import retrofit2.http.Header;
|
||||
|
||||
|
||||
public interface UserService {
|
||||
@GET("api/users")
|
||||
Call<List<User>> getAllUsers(@Header("Authorization") JwtToken token);
|
||||
|
||||
@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}")
|
||||
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);
|
||||
|
||||
@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}")
|
||||
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);
|
||||
|
||||
@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}")
|
||||
Call<List<User>> removeStudentFromWhitelist(@Path("tutorID") String tutorID, @Body StudentIdModel student,@Header("Authorization") JwtToken token);
|
||||
|
Loading…
Reference in New Issue
Block a user