mirror of
https://github.com/versia-pub/server.git
synced 2026-03-13 05:49:16 +01:00
refactor(federation): 🔥 Refactor Note federation and creation code
This commit is contained in:
parent
54b2dfb78d
commit
f79b0bc999
19 changed files with 243 additions and 354 deletions
|
|
@ -53,10 +53,7 @@ export default apiRoute((app) =>
|
|||
),
|
||||
);
|
||||
|
||||
if (
|
||||
!(note && (await note.isViewableByUser(null))) ||
|
||||
note.isRemote()
|
||||
) {
|
||||
if (!(note && (await note.isViewableByUser(null))) || note.remote) {
|
||||
throw ApiError.noteNotFound();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -63,10 +63,7 @@ export default apiRoute((app) =>
|
|||
),
|
||||
);
|
||||
|
||||
if (
|
||||
!(note && (await note.isViewableByUser(null))) ||
|
||||
note.isRemote()
|
||||
) {
|
||||
if (!(note && (await note.isViewableByUser(null))) || note.remote) {
|
||||
throw ApiError.noteNotFound();
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -61,10 +61,7 @@ export default apiRoute((app) =>
|
|||
),
|
||||
);
|
||||
|
||||
if (
|
||||
!(note && (await note.isViewableByUser(null))) ||
|
||||
note.isRemote()
|
||||
) {
|
||||
if (!(note && (await note.isViewableByUser(null))) || note.remote) {
|
||||
throw ApiError.noteNotFound();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue