use of com.pratilipi.data.client.UserAuthorData in project pratilipi by Pratilipi.
the class UserAuthorDataUtil method createUserAuthorData.
public static UserAuthorData createUserAuthorData(UserAuthor userAuthor) {
if (userAuthor == null)
return null;
UserAuthorData userAuthorData = new UserAuthorData();
userAuthorData.setId(userAuthor.getId());
userAuthorData.setUserId(userAuthor.getUserId());
userAuthorData.setAuthorId(userAuthor.getAuthorId());
userAuthorData.setFollowState(userAuthor.getFollowState());
userAuthorData.setFollowDate(userAuthor.getFollowDate());
return userAuthorData;
}
use of com.pratilipi.data.client.UserAuthorData in project pratilipi by Pratilipi.
the class UserAuthorFollowV2Api method post.
@Post
public Response post(PostRequest request) throws InvalidArgumentException, InsufficientAccessException {
Long userId = AccessTokenFilter.getAccessToken().getUserId();
UserAuthorData userAuthorData = UserAuthorDataUtil.saveUserAuthorFollow(userId, request.authorId, request.state);
return new Response(userAuthorData);
}
use of com.pratilipi.data.client.UserAuthorData in project pratilipi by Pratilipi.
the class UserAuthorFollowV1Api method post.
@Post
public Response post(PostRequest request) throws InvalidArgumentException, InsufficientAccessException {
Long userId = AccessTokenFilter.getAccessToken().getUserId();
UserAuthorData userAuthorData = UserAuthorDataUtil.saveUserAuthorFollow(userId, request.authorId, request.following ? UserFollowState.FOLLOWING : UserFollowState.UNFOLLOWED);
return new Response(userAuthorData);
}
Aggregations