Skip to content

Commit 67df6c5

Browse files
committed
refactor: publish code
1 parent d69931b commit 67df6c5

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

apps/book-server/src/services/BookBuildService/index.mts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ export class BookBuildService implements Service {
3737
private readonly pageService: PageService,
3838
) {}
3939
public async build(url_slug: string, signedWriterId?: string): Promise<BuildResult> {
40-
// TODO: ADD authentication
4140
if (!signedWriterId) {
4241
throw new UnauthorizedError('Not logged in')
4342
}
@@ -73,7 +72,6 @@ export class BookBuildService implements Service {
7372
const dest = path.resolve(process.cwd(), 'books', book.id)
7473

7574
// TODO: ADD handle cache from s3
76-
7775
const pagesDir = `${dest}/pages`
7876
const baseExists = fs.existsSync(dest)
7977
if (!baseExists) {
@@ -114,7 +112,6 @@ export class BookBuildService implements Service {
114112
fs.writeFileSync(
115113
`${dest}/next.config.mjs`,
116114
nextConfigTempate({
117-
bucketUrl: ENV.bookBucketUrl,
118115
deployCode: deployCode,
119116
urlSlug: book.url_slug,
120117
}),

apps/book-server/src/templates/nextConfigTemplate.mts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
type Props = {
2-
bucketUrl: string
32
deployCode: string
43
urlSlug: string
54
}
65

7-
export const nextConfigTempate = ({ bucketUrl, deployCode, urlSlug }: Props) => {
6+
export const nextConfigTempate = ({ deployCode, urlSlug }: Props) => {
87
return `
98
import nextra from 'nextra'
109

0 commit comments

Comments
 (0)