fixed response type for post methods

This commit is contained in:
Marcin Jedyński 2018-08-26 16:19:04 +02:00
parent ceeb62bcec
commit 4510b887cc
4 changed files with 10 additions and 6 deletions

6
.gitignore vendored
View File

@ -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

Binary file not shown.

View File

@ -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">

View File

@ -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);