Skip to content

Commit

Permalink
fix(nuxt3): no image url
Browse files Browse the repository at this point in the history
  • Loading branch information
LarchLiu committed Nov 14, 2023
1 parent 26fee62 commit aa34044
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions server/nuxt3/server/api/save-to-notion.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ import { errorMessage } from '@stargram/core/utils'
export default eventHandler(async (event) => {
let apiKey = getHeader(event, 'Authorization')
apiKey = apiKey!.split('Bearer ')[1]
const req = await readBody<{ title: string; url: string; summary: string; apiKey: string; databaseId: string; image: string }>(event)
const req = await readBody<{ title: string; url: string; summary: string; apiKey: string; databaseId: string }>(event)
const title = req.title
const url = req.url
const summary = req.summary
const databaseId = req.databaseId
const defaultOgImage = req.image
// const defaultOgImage = req.image

try {
const storage = new NotionDataStorage({ apiKey, databaseId, defaultOgImage },
const storage = new NotionDataStorage({ apiKey, databaseId, defaultOgImage: '' },
{ title, summary, url, content: '', categories: [], meta: {} })
const data = await storage.create()
return data
Expand Down

1 comment on commit aa34044

@vercel
Copy link

@vercel vercel bot commented on aa34044 Nov 14, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

star-nexus – ./

star-nexus-git-main-larchliu.vercel.app
star-nexus.vercel.app
star-nexus-larchliu.vercel.app

Please sign in to comment.