File tree Expand file tree Collapse file tree 2 files changed +13
-3
lines changed
apps/web/pages/api/integrations Expand file tree Collapse file tree 2 files changed +13
-3
lines changed Original file line number Diff line number Diff line change 1+ import { IErrorResponse } from "@changes-page/supabase/types/api" ;
2+ import { IPost , PostStatus } from "@changes-page/supabase/types/page" ;
13import type { NextApiRequest , NextApiResponse } from "next" ;
24import { v4 } from "uuid" ;
3- import { IErrorResponse } from "@changes-page/supabase/types/api" ;
4- import { IPost } from "@changes-page/supabase/types/page" ;
55import {
66 createPost ,
77 getPageByIntegrationSecret ,
@@ -37,6 +37,11 @@ export default async function handler(
3737 type,
3838 status,
3939 images_folder : v4 ( ) ,
40+ publication_date :
41+ status === PostStatus . published ? new Date ( ) . toISOString ( ) : null ,
42+ notes : "" ,
43+ allow_reactions : false ,
44+ email_notified : false ,
4045 } ) ;
4146
4247 res . status ( 200 ) . json ( {
Original file line number Diff line number Diff line change 11import { IErrorResponse } from "@changes-page/supabase/types/api" ;
2- import { IPost } from "@changes-page/supabase/types/page" ;
2+ import { IPost , PostStatus } from "@changes-page/supabase/types/page" ;
33import type { NextApiRequest , NextApiResponse } from "next" ;
44import { v4 } from "uuid" ;
55import {
@@ -41,6 +41,11 @@ export default async function handler(
4141 tags,
4242 status,
4343 images_folder : v4 ( ) ,
44+ publication_date :
45+ status === PostStatus . published ? new Date ( ) . toISOString ( ) : null ,
46+ notes : "" ,
47+ allow_reactions : false ,
48+ email_notified : false ,
4449 } ) ;
4550
4651 res . status ( 200 ) . json ( data ) ;
You can’t perform that action at this time.
0 commit comments