mirror of
https://github.com/versia-pub/api.git
synced 2025-12-06 16:38:20 +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: (
|
||||||
extension: typeof EntityValidator.$Extension,
|
extension: typeof EntityValidator.$Extension,
|
||||||
) => MaybePromise<T>;
|
) => MaybePromise<T>;
|
||||||
|
patch: (patch: typeof EntityValidator.$Patch) => MaybePromise<T>;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -78,6 +79,13 @@ export class RequestParserHandler {
|
||||||
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
case "Patch": {
|
||||||
|
const patch = await this.validator.Patch(this.body);
|
||||||
|
|
||||||
|
if (callbacks.patch) return await callbacks.patch(patch);
|
||||||
|
|
||||||
|
break;
|
||||||
|
}
|
||||||
case "Follow": {
|
case "Follow": {
|
||||||
const follow = await this.validator.Follow(this.body);
|
const follow = await this.validator.Follow(this.body);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue