mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
add page id in updated page json file in gcs (#319)
This commit is contained in:
parent
d595d4a8c4
commit
27735f7310
2 changed files with 4 additions and 4 deletions
|
|
@ -37,9 +37,9 @@ export const createPubSubClient = (): PubsubClient => {
|
|||
Buffer.from(JSON.stringify({ userId, email, name, username }))
|
||||
)
|
||||
},
|
||||
pageSaved: (page: Partial<Page>, userId: string): Promise<void> => {
|
||||
pageUpdated: (page: Partial<Page>, userId: string): Promise<void> => {
|
||||
return publish(
|
||||
'pageSaved',
|
||||
'pageUpdated',
|
||||
Buffer.from(JSON.stringify({ ...page, userId }))
|
||||
)
|
||||
},
|
||||
|
|
@ -73,7 +73,7 @@ export interface PubsubClient {
|
|||
username: string
|
||||
) => Promise<void>
|
||||
pageCreated: (page: Page) => Promise<void>
|
||||
pageSaved: (page: Partial<Page>, userId: string) => Promise<void>
|
||||
pageUpdated: (page: Partial<Page>, userId: string) => Promise<void>
|
||||
pageDeleted: (id: string, userId: string) => Promise<void>
|
||||
reportSubmitted(
|
||||
submitterId: string | undefined,
|
||||
|
|
|
|||
|
|
@ -206,7 +206,7 @@ export const updatePage = async (
|
|||
|
||||
if (body.result !== 'updated') return false
|
||||
|
||||
await ctx.pubsub.pageSaved(page, ctx.uid)
|
||||
await ctx.pubsub.pageUpdated({ ...page, id }, ctx.uid)
|
||||
|
||||
return true
|
||||
} catch (e) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue