aboutsummaryrefslogtreecommitdiff
path: root/back-end
diff options
context:
space:
mode:
authorLibravatar vnugent <public@vaughnnugent.com>2024-08-17 22:01:32 -0400
committerLibravatar vnugent <public@vaughnnugent.com>2024-08-17 22:01:32 -0400
commit85540afac8a5ba822d845039c8a61fe48b3a1b6a (patch)
tree066948341105583a6ecf6697372cbeb961c5a174 /back-end
parent2cbd35be45dfaa4040626eaddd9c52c368a59bb2 (diff)
parentf0d91ad12e3a01118357b0cbf2aabbcd7464028f (diff)
Merge branch 'develop' into widget
Diffstat (limited to 'back-end')
-rw-r--r--back-end/src/Endpoints/BookmarkEndpoint.cs31
-rw-r--r--back-end/src/SimpleBookmark.csproj10
2 files changed, 26 insertions, 15 deletions
diff --git a/back-end/src/Endpoints/BookmarkEndpoint.cs b/back-end/src/Endpoints/BookmarkEndpoint.cs
index 19f5118..ae2932d 100644
--- a/back-end/src/Endpoints/BookmarkEndpoint.cs
+++ b/back-end/src/Endpoints/BookmarkEndpoint.cs
@@ -131,7 +131,13 @@ namespace SimpleBookmark.Endpoints
{
//Get the collection of bookmarks
List<BookmarkEntry> list = Bookmarks.ListRental.Rent();
- await Bookmarks.GetUserPageAsync(list, entity.Session.UserID, 0, (int)BmConfig.PerPersonQuota);
+
+ await Bookmarks.GetUserPageAsync(
+ collection: list,
+ userId: entity.Session.UserID,
+ page: 0,
+ limit: (int)BmConfig.PerPersonQuota
+ );
//Alloc memory stream for output
VnMemoryStream output = new(MemoryUtil.Shared, 16 * 1024, false);
@@ -205,13 +211,13 @@ namespace SimpleBookmark.Endpoints
//Get bookmarks
BookmarkEntry[] bookmarks = await Bookmarks.SearchBookmarksAsync(
- entity.Session.UserID,
+ userId : entity.Session.UserID,
query,
tags,
(int)limit,
(int)offset,
- entity.EventCancellation
- );
+ cancellation: entity.EventCancellation
+ );
//Return result
return VirtualOkJson(entity, bookmarks);
@@ -248,11 +254,11 @@ namespace SimpleBookmark.Endpoints
* and the entry does not already exist by the desired url.
*/
int result = await Bookmarks.AddSingleIfNotExists(
- entity.Session.UserID,
- newBookmark,
- entity.RequestedTimeUtc.DateTime,
- BmConfig.PerPersonQuota,
- entity.EventCancellation
+ userId: entity.Session.UserID,
+ entry: newBookmark,
+ now: entity.RequestedTimeUtc.DateTime,
+ maxRecords: BmConfig.PerPersonQuota,
+ cancellation: entity.EventCancellation
);
if (webm.Assert(result > -1, "You have reached your bookmark quota"))
@@ -386,7 +392,12 @@ namespace SimpleBookmark.Endpoints
try
{
//Try to update the records
- ERRNO result = await Bookmarks.AddBulkAsync(sanitized, entity.Session.UserID, entity.RequestedTimeUtc, entity.EventCancellation);
+ ERRNO result = await Bookmarks.AddBulkAsync(
+ bookmarks: sanitized,
+ userId: entity.Session.UserID,
+ now: entity.RequestedTimeUtc,
+ cancellation: entity.EventCancellation
+ );
webm.Result = $"Successfully added {result} of {batch.Length} bookmarks";
webm.Success = true;
diff --git a/back-end/src/SimpleBookmark.csproj b/back-end/src/SimpleBookmark.csproj
index 71fe747..382d141 100644
--- a/back-end/src/SimpleBookmark.csproj
+++ b/back-end/src/SimpleBookmark.csproj
@@ -33,11 +33,11 @@
</ItemGroup>
<ItemGroup>
- <PackageReference Include="VNLib.Plugins.Extensions.Data" Version="0.1.0-ci0063" />
- <PackageReference Include="VNLib.Plugins.Extensions.Loading" Version="0.1.0-ci0063" />
- <PackageReference Include="VNLib.Plugins.Extensions.Loading.Sql" Version="0.1.0-ci0063" />
- <PackageReference Include="VNLib.Plugins.Extensions.Validation" Version="0.1.0-ci0063" />
- <PackageReference Include="VNLib.Plugins.Extensions.VNCache" Version="0.1.0-ci0056" />
+ <PackageReference Include="VNLib.Plugins.Extensions.Data" Version="0.1.0-ci0064" />
+ <PackageReference Include="VNLib.Plugins.Extensions.Loading" Version="0.1.0-ci0064" />
+ <PackageReference Include="VNLib.Plugins.Extensions.Loading.Sql" Version="0.1.0-ci0064" />
+ <PackageReference Include="VNLib.Plugins.Extensions.Validation" Version="0.1.0-ci0064" />
+ <PackageReference Include="VNLib.Plugins.Extensions.VNCache" Version="0.1.0-ci0057" />
</ItemGroup>
<ItemGroup>