fix type error
This commit is contained in:
parent
39fba74dd1
commit
fef9ebfe06
|
@ -53,6 +53,10 @@ export class InboxProcessorService {
|
||||||
@bindThis
|
@bindThis
|
||||||
public async process(job: Bull.Job<InboxJobData>): Promise<string> {
|
public async process(job: Bull.Job<InboxJobData>): Promise<string> {
|
||||||
const signature = 'version' in job.data.signature ? job.data.signature.value : job.data.signature;
|
const signature = 'version' in job.data.signature ? job.data.signature.value : job.data.signature;
|
||||||
|
if (Array.isArray(signature)) {
|
||||||
|
// RFC 9401はsignatureが配列になるが、とりあえずエラーにする
|
||||||
|
throw new Error('signature is array');
|
||||||
|
}
|
||||||
const activity = job.data.activity;
|
const activity = job.data.activity;
|
||||||
|
|
||||||
//#region Log
|
//#region Log
|
||||||
|
|
|
@ -57,7 +57,7 @@ export default class extends Endpoint<typeof meta, typeof paramDef> { // eslint-
|
||||||
|
|
||||||
for (const job of jobs) {
|
for (const job of jobs) {
|
||||||
const signature = 'version' in job.data.signature ? job.data.signature.value : job.data.signature;
|
const signature = 'version' in job.data.signature ? job.data.signature.value : job.data.signature;
|
||||||
const host = new URL(signature.keyId).host;
|
const host = Array.isArray(signature) ? 'TODO' : new URL(signature.keyId).host;
|
||||||
if (res.find(x => x[0] === host)) {
|
if (res.find(x => x[0] === host)) {
|
||||||
res.find(x => x[0] === host)![1]++;
|
res.find(x => x[0] === host)![1]++;
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue