Skip to content

Commit

Permalink
rm unused
Browse files Browse the repository at this point in the history
  • Loading branch information
huozhi committed May 5, 2023
1 parent 6539d9c commit a28be6c
Showing 1 changed file with 3 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,18 +45,13 @@ function getStaticRouteCode(resourcePath: string, fileBaseName: string) {
? cacheHeader.none
: cacheHeader.longCache
const code = `\
import fs from 'fs'
import { fileURLToPath } from 'url'
import { NextResponse } from 'next/server'
const contentType = ${JSON.stringify(getContentType(resourcePath))}
const resourceUrl = new URL(import.meta.url)
const filePath = fileURLToPath(resourceUrl).replace(${JSON.stringify(
METADATA_RESOURCE_QUERY
)}, '')
const buffer = Buffer.from(${JSON.stringify(
fs.readFileSync(resourcePath).toString('utf-8')
fs
.readFileSync(resourcePath.replace(METADATA_RESOURCE_QUERY, ''))
.toString('utf-8')
)})
export function GET() {
Expand Down

0 comments on commit a28be6c

Please sign in to comment.