From 4510b887ccca13cd6f14e0c439ae02160cc4bf14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marcin=20Jedy=C5=84ski?= Date: Sun, 26 Aug 2018 16:19:04 +0200 Subject: [PATCH] fixed response type for post methods --- .gitignore | 6 ++++-- .idea/caches/build_file_checksums.ser | Bin 0 -> 540 bytes .idea/misc.xml | 2 +- .../uam/wmi/findmytutor/service/UserService.java | 8 +++++--- 4 files changed, 10 insertions(+), 6 deletions(-) create mode 100644 .idea/caches/build_file_checksums.ser diff --git a/.gitignore b/.gitignore index 3c117df..0c1fdca 100644 --- a/.gitignore +++ b/.gitignore @@ -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 \ No newline at end of file +fastlane/readme.md diff --git a/.idea/caches/build_file_checksums.ser b/.idea/caches/build_file_checksums.ser new file mode 100644 index 0000000000000000000000000000000000000000..065fdfe34a95bb8b03dcca74561cfff4cc6a7a85 GIT binary patch literal 540 zcmZ4UmVvdnh`~NNKUXg?FQq6yGexf?KR>5fFEb@IQ7^qHF(oHeub?PDD>b=9F91S2 zm1gFoxMk*~I%lLNXBU^|7Q2L-Ts|(GuF1r}Q#7BMhIJFWRF{)3GpI3_o-C@VF^ z&?p9~D+Upm1*t_PnW@F4aC5H6_T21e*u?U(fpf;2A5L{83_K_47&`?vLw{r566LUaOgkfsH+?5_iXBZyT^R;EYec5hV!XSvp4WE0NSM5ny>bJ=@ L&G^|_fusrms{FdJ literal 0 HcmV?d00001 diff --git a/.idea/misc.xml b/.idea/misc.xml index c0f68ed..99202cc 100644 --- a/.idea/misc.xml +++ b/.idea/misc.xml @@ -25,7 +25,7 @@ - + diff --git a/app/src/main/java/com/uam/wmi/findmytutor/service/UserService.java b/app/src/main/java/com/uam/wmi/findmytutor/service/UserService.java index e74aaac..8aad341 100644 --- a/app/src/main/java/com/uam/wmi/findmytutor/service/UserService.java +++ b/app/src/main/java/com/uam/wmi/findmytutor/service/UserService.java @@ -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> getAllUsers(@Header("Authorization") JwtToken token); @POST("api/users") - Call> postAllUsers(@Header("Authorization") JwtToken token); + Call createUser(@Body User user,@Header("Authorization") JwtToken token); @GET("api/users/page/{pageNum}") Call getPagedUsers(@Path("pageNum") String pageNum, @Header("Authorization") JwtToken token); @@ -56,7 +58,7 @@ public interface UserService { Call setTutorBlacklist(@Path("tutorID") String tutorID, @Body IsUsingListBool isUsing,@Header("Authorization") JwtToken token); @POST("api/users/blacklist/{tutorID}") - Call> addStudentToBlacklist(@Path("tutorID") String tutorID, @Body StudentIdModel student,@Header("Authorization") JwtToken token); + Call addStudentToBlacklist(@Path("tutorID") String tutorID, @Body StudentIdModel student,@Header("Authorization") JwtToken token); @DELETE("api/users/blacklist/{tutorID}") Call> removeStudentFromBlacklist(@Path("tutorID") String tutorID, @Body StudentIdModel student,@Header("Authorization") JwtToken token); @@ -68,7 +70,7 @@ public interface UserService { Call setTutorWhitelist(@Path("tutorID") String tutorID, @Body IsUsingListBool isUsing,@Header("Authorization") JwtToken token); @POST("api/users/whitelist/{tutorID}") - Call> addStudentTowhitelist(@Path("tutorID") String tutorID, @Body StudentIdModel student,@Header("Authorization") JwtToken token); + Call addStudentTowhitelist(@Path("tutorID") String tutorID, @Body StudentIdModel student,@Header("Authorization") JwtToken token); @DELETE("api/users/whitelist/{tutorID}") Call> removeStudentFromWhitelist(@Path("tutorID") String tutorID, @Body StudentIdModel student,@Header("Authorization") JwtToken token);