Fix types
This commit is contained in:
@ -160,7 +160,7 @@ const extractPropDefRef = (props: any[]) => {
|
||||
const router = new Router();
|
||||
|
||||
router.get('/assets/*', async ctx => {
|
||||
await send(ctx, ctx.params[0], {
|
||||
await send(ctx as any, ctx.params[0], {
|
||||
root: `${__dirname}/../../docs/assets/`,
|
||||
maxage: ms('1 days')
|
||||
});
|
||||
|
@ -51,7 +51,7 @@ const router = new Router();
|
||||
//#region static assets
|
||||
|
||||
router.get('/assets/*', async ctx => {
|
||||
await send(ctx, ctx.path, {
|
||||
await send(ctx as any, ctx.path, {
|
||||
root: client,
|
||||
maxage: ms('7 days'),
|
||||
immutable: true
|
||||
@ -60,21 +60,21 @@ router.get('/assets/*', async ctx => {
|
||||
|
||||
// Apple touch icon
|
||||
router.get('/apple-touch-icon.png', async ctx => {
|
||||
await send(ctx, '/assets/apple-touch-icon.png', {
|
||||
await send(ctx as any, '/assets/apple-touch-icon.png', {
|
||||
root: client
|
||||
});
|
||||
});
|
||||
|
||||
// ServiceWorker
|
||||
router.get(/^\/sw\.(.+?)\.js$/, async ctx => {
|
||||
await send(ctx, `/assets/sw.${ctx.params[0]}.js`, {
|
||||
await send(ctx as any, `/assets/sw.${ctx.params[0]}.js`, {
|
||||
root: client
|
||||
});
|
||||
});
|
||||
|
||||
// Manifest
|
||||
router.get('/manifest.json', async ctx => {
|
||||
await send(ctx, '/assets/manifest.json', {
|
||||
await send(ctx as any, '/assets/manifest.json', {
|
||||
root: client
|
||||
});
|
||||
});
|
||||
|
@ -3,7 +3,7 @@ import * as request from 'request-promise-native';
|
||||
import summaly from 'summaly';
|
||||
import fetchMeta from '../../misc/fetch-meta';
|
||||
|
||||
module.exports = async (ctx: Koa.Context) => {
|
||||
module.exports = async (ctx: Koa.BaseContext) => {
|
||||
const meta = await fetchMeta();
|
||||
|
||||
try {
|
||||
|
Reference in New Issue
Block a user