* wip

* ✌️

* use ajv/dist/core

* revert try

* clean up
This commit is contained in:
tamaina 2022-02-20 13:15:40 +09:00 committed by GitHub
parent fd8f8162e1
commit fcfb5ef0a3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
304 changed files with 307 additions and 306 deletions

View file

@ -1,5 +1,5 @@
import * as fs from 'fs';
import * as Ajv from 'ajv';
import Ajv from 'ajv';
import { ILocalUser } from '@/models/entities/user';
import { IEndpointMeta } from './endpoints';
import { ApiError } from './error';
@ -65,6 +65,6 @@ export default function <T extends IEndpointMeta, Ps extends Schema>(meta: T, pa
return Promise.reject(err);
}
return cb(params, user, token, file, cleanup);
return cb(params as SchemaType<Ps>, user, token, file, cleanup);
};
}