相关数据关联UserDataEntity, 统一在Interceptor添加token
This commit is contained in:
@ -29,9 +29,9 @@ public class PostCommentUtils {
|
||||
RequestBody body = RequestBody.create(MediaType.parse("application/json"), content);
|
||||
Observable<ResponseBody> observable;
|
||||
if (commentEntity != null) {
|
||||
observable = RetrofitManager.getInstance(context).getApi().postReplyComment(LoginUtils.getToken(context), commentEntity.getId(), body);
|
||||
observable = RetrofitManager.getInstance(context).getApi().postReplyComment(commentEntity.getId(), body);
|
||||
} else {
|
||||
observable = RetrofitManager.getInstance(context).getApi().postNewsComment(LoginUtils.getToken(context), newsId, body);
|
||||
observable = RetrofitManager.getInstance(context).getApi().postNewsComment(newsId, body);
|
||||
}
|
||||
observable.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
@ -59,7 +59,7 @@ public class PostCommentUtils {
|
||||
public static void addCommentVoto(final Context context, final String commentId,
|
||||
final PostCommentListener listener) {
|
||||
RetrofitManager.getInstance(context).getApi()
|
||||
.postCommentVote(LoginUtils.getToken(context), commentId)
|
||||
.postCommentVote(commentId)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Response<ResponseBody>() {
|
||||
@ -83,7 +83,7 @@ public class PostCommentUtils {
|
||||
final PostCommentListener listener) {
|
||||
RequestBody body = RequestBody.create(MediaType.parse("application/json"), reportData);
|
||||
RetrofitManager.getInstance(context).getApi()
|
||||
.postReportData(body, LoginUtils.getToken(context))
|
||||
.postReportData(body)
|
||||
.subscribeOn(Schedulers.io())
|
||||
.observeOn(AndroidSchedulers.mainThread())
|
||||
.subscribe(new Response<ResponseBody>() {
|
||||
|
||||
Reference in New Issue
Block a user