mirror of
https://github.com/tomru/pdfer.git
synced 2026-03-03 06:27:19 +01:00
change api
This commit is contained in:
@@ -1,9 +1,9 @@
|
||||
import { NextApiRequest, NextApiResponse } from 'next'
|
||||
|
||||
import { brief as briefTemplate } from '../../../../lib/templates'
|
||||
import renderer from '../../../../lib/renderer'
|
||||
import * as store from '../../../../lib/store'
|
||||
import { IDocProps } from '../../../../interfaces/IDocProps'
|
||||
import { brief as briefTemplate } from '../../../lib/templates'
|
||||
import renderer from '../../../lib/renderer'
|
||||
import * as store from '../../../lib/store'
|
||||
import { IDocProps } from '../../../interfaces/IDocProps'
|
||||
|
||||
const TEMPLATES: { [key: string]: (options: IDocProps) => string } = {
|
||||
brief: briefTemplate,
|
||||
@@ -24,7 +24,7 @@ const handler = async (req: NextApiRequest, res: NextApiResponse) => {
|
||||
const template = TEMPLATES[templateName]
|
||||
|
||||
if (!template) {
|
||||
res.status(404).json({ statusCode: 404, message: 'Template not availabe' })
|
||||
res.status(404).json({ statusCode: 404, message: 'Template not specified availabe' })
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user