mirror of
https://github.com/versia-pub/api.git
synced 2025-12-06 00:18:19 +01:00
feat(federation): ✨ Add patch to inbox handler
This commit is contained in:
parent
3ed54a7c21
commit
69be6967bd
|
|
@ -21,6 +21,7 @@ type ParserCallbacks<T> = {
|
|||
extension: (
|
||||
extension: typeof EntityValidator.$Extension,
|
||||
) => MaybePromise<T>;
|
||||
patch: (patch: typeof EntityValidator.$Patch) => MaybePromise<T>;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
@ -78,6 +79,13 @@ export class RequestParserHandler {
|
|||
|
||||
break;
|
||||
}
|
||||
case "Patch": {
|
||||
const patch = await this.validator.Patch(this.body);
|
||||
|
||||
if (callbacks.patch) return await callbacks.patch(patch);
|
||||
|
||||
break;
|
||||
}
|
||||
case "Follow": {
|
||||
const follow = await this.validator.Follow(this.body);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue