Skip to content

Commit

Permalink
Merge pull request #153 from StarfilesFileSharing/alpha
Browse files Browse the repository at this point in the history
Fix circular statement
  • Loading branch information
QuixThe2nd authored Nov 5, 2024
2 parents 1afce2d + 9834427 commit 9dee78c
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion deno.jsonc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@starfiles/hydrafiles",
"version": "0.7.38",
"version": "0.7.39",
"description": "The (P2P) web privacy layer.",
"main": "src/hydrafiles.ts",
"exports": {
Expand Down
9 changes: 8 additions & 1 deletion src/rpc/server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,14 @@ class RPCServer {
const rows = Array.from(this._client.files.files.values()).map((row) => {
const { downloadCount, found, ...rest } = row;
const _ = { downloadCount, found };
return rest;
const filteredRest = Object.keys(rest)
.filter((key) => !key.startsWith("_"))
.reduce((obj, key) => {
// @ts-expect-error:
obj[key] = rest[key];
return obj;
}, {});
return filteredRest;
});
headers.set("Content-Type", "application/json");
headers.set("Cache-Control", "public, max-age=10800");
Expand Down

0 comments on commit 9dee78c

Please sign in to comment.