expliciting type checks and predicates (server only)
This commit is contained in:
parent
5f7021c33d
commit
c1e791bad0
34 changed files with 127 additions and 84 deletions
|
@ -15,7 +15,7 @@ async function computeBody (payload: { body: any, signatureActorId?: number }) {
|
|||
}
|
||||
|
||||
async function buildSignedRequestOptions (payload: { signatureActorId?: number }) {
|
||||
let actor: ActorModel
|
||||
let actor: ActorModel | null
|
||||
if (payload.signatureActorId) {
|
||||
actor = await ActorModel.load(payload.signatureActorId)
|
||||
if (!actor) throw new Error('Unknown signature actor id.')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue