aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2022-05-01 22:50:59 +0800
committercrupest <crupest@outlook.com>2022-05-01 22:50:59 +0800
commit49cfe34ccf3bd87e02668a3f6f97652662cdeb36 (patch)
tree9ef7dc0ec7358df1b6eec72195d22af30499bf0c
parentdb85383e682fbaae4bd3fc5c7f708925b206366f (diff)
downloadtimeline-49cfe34ccf3bd87e02668a3f6f97652662cdeb36.tar.gz
timeline-49cfe34ccf3bd87e02668a3f6f97652662cdeb36.tar.bz2
timeline-49cfe34ccf3bd87e02668a3f6f97652662cdeb36.zip
...
-rw-r--r--BackEnd/Timeline/Services/Api/TimelineBookmarkService1.cs2
-rw-r--r--FrontEnd/src/services/user.ts2
2 files changed, 2 insertions, 2 deletions
diff --git a/BackEnd/Timeline/Services/Api/TimelineBookmarkService1.cs b/BackEnd/Timeline/Services/Api/TimelineBookmarkService1.cs
index 648ea9ff..7fd2fdb6 100644
--- a/BackEnd/Timeline/Services/Api/TimelineBookmarkService1.cs
+++ b/BackEnd/Timeline/Services/Api/TimelineBookmarkService1.cs
@@ -143,7 +143,7 @@ namespace Timeline.Services.Api
var user = await _userService.GetUserAsync(userId);
var totalCount = await _databaseContext.BookmarkTimelines.Where(b => b.UserId == userId).CountAsync();
- var entities = await _databaseContext.BookmarkTimelines.Where(b => b.UserId == userId).Skip(pageSize * (page - 1)).Take(pageSize).ToListAsync();
+ var entities = await _databaseContext.BookmarkTimelines.Where(b => b.UserId == userId).OrderBy(b => b.Rank).Skip(pageSize * (page - 1)).Take(pageSize).ToListAsync();
var items = new List<TimelineBookmark>();
foreach (var entity in entities)
diff --git a/FrontEnd/src/services/user.ts b/FrontEnd/src/services/user.ts
index 2d6b6e33..b7e6c44d 100644
--- a/FrontEnd/src/services/user.ts
+++ b/FrontEnd/src/services/user.ts
@@ -98,7 +98,7 @@ export class UserService {
this.userSubject.next(user);
},
(error) => {
- if (!(error instanceof HttpNetworkError)) {
+ if (error instanceof HttpBadRequestError) {
localStorage.removeItem(USER_STORAGE_KEY);
this.userSubject.next(null);
pushAlert({