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 0000000..065fdfe Binary files /dev/null and b/.idea/caches/build_file_checksums.ser differ 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);