add savedAt and publishedAt to saveUrl api

This commit is contained in:
Hongbo Wu
2023-08-14 17:10:34 +08:00
parent e3654e8ae2
commit 5f6be169bd
8 changed files with 27 additions and 4 deletions

View File

@ -229,6 +229,8 @@ export const enqueueParseRequest = async ({
labels,
locale,
timezone,
savedAt,
publishedAt,
}: {
url: string
userId: string
@ -239,6 +241,8 @@ export const enqueueParseRequest = async ({
labels?: CreateLabelInput[]
locale?: string
timezone?: string
savedAt?: number // unix timestamp
publishedAt?: number // unix timestamp
}): Promise<string> => {
const { GOOGLE_CLOUD_PROJECT } = process.env
const payload = {
@ -249,6 +253,8 @@ export const enqueueParseRequest = async ({
labels,
locale,
timezone,
savedAt,
publishedAt,
}
// If there is no Google Cloud Project Id exposed, it means that we are in local environment