mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 13:59:16 +01:00
perf(api): ⚡ Store user and post metrics directly in database instead of recalculating them on-the-fly
Some checks failed
CodeQL Scan / Analyze (javascript-typescript) (push) Failing after 0s
Build Docker Images / lint (push) Failing after 6s
Build Docker Images / check (push) Failing after 6s
Build Docker Images / tests (push) Failing after 6s
Deploy Docs to GitHub Pages / build (push) Failing after 1s
Build Docker Images / build (server, Dockerfile, ${{ github.repository_owner }}/server) (push) Has been skipped
Build Docker Images / build (worker, Worker.Dockerfile, ${{ github.repository_owner }}/worker) (push) Has been skipped
Deploy Docs to GitHub Pages / Deploy (push) Has been skipped
Mirror to Codeberg / Mirror (push) Failing after 1s
Nix Build / check (push) Failing after 1s
Some checks failed
CodeQL Scan / Analyze (javascript-typescript) (push) Failing after 0s
Build Docker Images / lint (push) Failing after 6s
Build Docker Images / check (push) Failing after 6s
Build Docker Images / tests (push) Failing after 6s
Deploy Docs to GitHub Pages / build (push) Failing after 1s
Build Docker Images / build (server, Dockerfile, ${{ github.repository_owner }}/server) (push) Has been skipped
Build Docker Images / build (worker, Worker.Dockerfile, ${{ github.repository_owner }}/worker) (push) Has been skipped
Deploy Docs to GitHub Pages / Deploy (push) Has been skipped
Mirror to Codeberg / Mirror (push) Failing after 1s
Nix Build / check (push) Failing after 1s
This commit is contained in:
parent
cd12ccd6c1
commit
ddb3cfc978
16 changed files with 2676 additions and 106 deletions
|
|
@ -417,7 +417,22 @@ export class InboxProcessor {
|
|||
);
|
||||
}
|
||||
|
||||
await like.delete();
|
||||
const likeAuthor = await User.fromId(like.data.likerId);
|
||||
const liked = await Note.fromId(like.data.likedId);
|
||||
|
||||
if (!liked) {
|
||||
throw new ApiError(
|
||||
404,
|
||||
"Liked Note not found or not owned by sender",
|
||||
);
|
||||
}
|
||||
|
||||
if (!likeAuthor) {
|
||||
throw new ApiError(404, "Like author not found");
|
||||
}
|
||||
|
||||
await likeAuthor.unlike(liked);
|
||||
|
||||
return;
|
||||
}
|
||||
case "pub.versia:shares/Share": {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue