Skip to content

Commit

Permalink
♻️ Fix b3log#770
Browse files Browse the repository at this point in the history
  • Loading branch information
88250 committed Sep 26, 2018
1 parent 4b56f09 commit 79c1f80
Show file tree
Hide file tree
Showing 9 changed files with 22 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@
* <li>Shows [point] notifications (/notifications/point), GET </li>
* <li>Shows [broadcast] notifications (/notifications/broadcast), GET</li>
* <li>Shows [sysAnnounce] notifications (/notifications/sys-announce), GET</li>
* <li>Makes article/comment read (/notification/read), GET</li>
* <li>Gets unread count of notifications (/notification/unread/count), GET</li>
* <li>Makes all notifications as read (/notification/all-read), GET</li>
* <li>Makes the specified type notifications as read (/notification/read/{type}), GET</li>
* <li>Removes a notification (/notification/remove), POST</li>
* <li>Remove notifications by the specified type (/notification/remove/{type}), GET </li>
* <li>Makes article/comment read (/notifications/read), GET</li>
* <li>Gets unread count of notifications (/notifications/unread/count), GET</li>
* <li>Makes all notifications as read (/notifications/all-read), GET</li>
* <li>Makes the specified type notifications as read (/notifications/read/{type}), GET</li>
* <li>Removes a notification (/notifications/remove), POST</li>
* <li>Remove notifications by the specified type (/notifications/remove/{type}), GET </li>
* </ul>
*
* @author <a href="http://88250.b3log.org">Liang Ding</a>
Expand Down Expand Up @@ -110,7 +110,7 @@ public class NotificationProcessor {
* @param request the specified request
* @param type the specified type: commented/reply/at/following/point/broadcast
*/
@RequestProcessing(value = "/notification/remove/{type}", method = HTTPRequestMethod.GET)
@RequestProcessing(value = "/notifications/remove/{type}", method = HTTPRequestMethod.GET)
@Before(adviceClass = {StopwatchStartAdvice.class, LoginCheck.class})
@After(adviceClass = StopwatchEndAdvice.class)
public void removeNotifications(final HTTPRequestContext context, final HttpServletRequest request, final String type) {
Expand Down Expand Up @@ -176,7 +176,7 @@ public void removeNotifications(final HTTPRequestContext context, final HttpServ
* @param request the specified request
* @param requestJSONObject the specified request json object
*/
@RequestProcessing(value = "/notification/remove", method = HTTPRequestMethod.POST)
@RequestProcessing(value = "/notifications/remove", method = HTTPRequestMethod.POST)
@Before(adviceClass = {StopwatchStartAdvice.class, LoginCheck.class})
@After(adviceClass = StopwatchEndAdvice.class)
public void removeNotification(final HTTPRequestContext context, final HttpServletRequest request, final JSONObject requestJSONObject) {
Expand Down Expand Up @@ -255,7 +255,7 @@ public void showSysAnnounceNotifications(final HTTPRequestContext context, final
* @param context the specified context
* @param request the specified request
*/
@RequestProcessing(value = "/notification/all-read", method = HTTPRequestMethod.GET)
@RequestProcessing(value = "/notifications/all-read", method = HTTPRequestMethod.GET)
@Before(adviceClass = {StopwatchStartAdvice.class, LoginCheck.class})
@After(adviceClass = StopwatchEndAdvice.class)
public void makeAllNotificationsRead(final HTTPRequestContext context, final HttpServletRequest request) {
Expand All @@ -274,7 +274,7 @@ public void makeAllNotificationsRead(final HTTPRequestContext context, final Htt
* @param request the specified request
* @param type the specified type: "commented"/"at"/"following"
*/
@RequestProcessing(value = "/notification/read/{type}", method = HTTPRequestMethod.GET)
@RequestProcessing(value = "/notifications/read/{type}", method = HTTPRequestMethod.GET)
@Before(adviceClass = {StopwatchStartAdvice.class, LoginCheck.class})
@After(adviceClass = StopwatchEndAdvice.class)
public void makeNotificationRead(final HTTPRequestContext context, final HttpServletRequest request, final String type) {
Expand Down Expand Up @@ -324,7 +324,7 @@ public void makeNotificationRead(final HTTPRequestContext context, final HttpSer
* @param response the specified response
* @throws Exception exception
*/
@RequestProcessing(value = "/notification/read", method = HTTPRequestMethod.POST)
@RequestProcessing(value = "/notifications/read", method = HTTPRequestMethod.POST)
@Before(adviceClass = {StopwatchStartAdvice.class, LoginCheck.class})
@After(adviceClass = StopwatchEndAdvice.class)
public void makeNotificationRead(final HTTPRequestContext context, final HttpServletRequest request,
Expand Down Expand Up @@ -818,7 +818,7 @@ public void showBroadcastNotifications(final HTTPRequestContext context, final H
* @param context the specified context
* @param request the specified request
*/
@RequestProcessing(value = "/notification/unread/count", method = HTTPRequestMethod.GET)
@RequestProcessing(value = "/notifications/unread/count", method = HTTPRequestMethod.GET)
@Before(adviceClass = {StopwatchStartAdvice.class, LoginCheck.class})
@After(adviceClass = {StopwatchEndAdvice.class})
public void getUnreadNotificationCount(final HTTPRequestContext context, final HttpServletRequest request) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/js/article.js
Original file line number Diff line number Diff line change
Expand Up @@ -1881,7 +1881,7 @@ var Article = {
}

$.ajax({
url: Label.servePath + '/notification/read',
url: Label.servePath + '/notifications/read',
type: 'POST',
cache: false,
data: JSON.stringify(requestJSONObject),
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/js/article.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/main/webapp/js/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ var Util = {
*/
makeNotificationRead: function (type, it) {
$.ajax({
url: Label.servePath + "/notification/read/" + type,
url: Label.servePath + "/notifications/read/" + type,
type: "GET",
cache: false,
success: function (result, textStatus) {
Expand Down Expand Up @@ -796,7 +796,7 @@ var Util = {
*/
setUnreadNotificationCount: function (isSendMsg) {
$.ajax({
url: Label.servePath + "/notification/unread/count",
url: Label.servePath + "/notifications/unread/count",
type: "GET",
cache: false,
success: function (result, textStatus) {
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/js/common.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/main/webapp/js/m-article.js
Original file line number Diff line number Diff line change
Expand Up @@ -1392,7 +1392,7 @@ var Article = {
};

$.ajax({
url: Label.servePath + "/notification/read",
url: Label.servePath + "/notifications/read",
type: "POST",
cache: false,
data: JSON.stringify(requestJSONObject)
Expand Down
2 changes: 1 addition & 1 deletion src/main/webapp/js/m-article.min.js

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions src/main/webapp/js/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -732,7 +732,7 @@ var Settings = {
*/
makeAllNotificationsRead: function () {
$.ajax({
url: Label.servePath + "/notification/all-read",
url: Label.servePath + "/notifications/all-read",
type: "GET",
cache: false,
success: function (result, textStatus) {
Expand All @@ -747,7 +747,7 @@ var Settings = {
*/
removeNotifications: function (type) {
$.ajax({
url: Label.servePath + '/notification/remove/' + type,
url: Label.servePath + '/notifications/remove/' + type,
type: 'GET',
cache: false,
success: function (result) {
Expand Down
Loading

0 comments on commit 79c1f80

Please sign in to comment.