1
0
mirror of https://github.com/bitwarden/server.git synced 2025-01-31 23:21:22 +01:00

PM-10563: Continuation Token returns null on response when no more records available

This commit is contained in:
Maciej Zieniuk 2024-10-17 11:06:17 +01:00
parent 86da346ee7
commit b7d6009704
No known key found for this signature in database
GPG Key ID: 9CACE59F1272ACD9
2 changed files with 5 additions and 3 deletions

View File

@ -48,10 +48,12 @@ public class NotificationRepository : Repository<Notification, Guid>, INotificat
},
commandType: CommandType.StoredProcedure);
var data = results.ToList();
return new PagedResult<NotificationStatusDetails>
{
Data = results.ToList(),
ContinuationToken = (pageNumber + 1).ToString()
Data = data,
ContinuationToken = data.Count < pageOptions.PageSize ? null : (pageNumber + 1).ToString()
};
}
}

View File

@ -71,7 +71,7 @@ public class NotificationRepository : Repository<Core.NotificationCenter.Entitie
return new PagedResult<NotificationStatusDetails>
{
Data = results,
ContinuationToken = (pageNumber + 1).ToString()
ContinuationToken = results.Count < pageOptions.PageSize ? null : (pageNumber + 1).ToString()
};
}
}