File tree Expand file tree Collapse file tree 1 file changed +5
-4
lines changed
apps/app/src/jobs/tasks/onboarding Expand file tree Collapse file tree 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import ky from "ky";
1414import z from "zod" ;
1515import { researchVendor } from "../scrape/research" ;
1616import { updatePolicies } from "./update-policies" ;
17+ import axios from "axios" ;
1718
1819export const onboardOrganization = task ( {
1920 id : "onboard-organization" ,
@@ -244,21 +245,21 @@ export const onboardOrganization = task({
244245 } ) ;
245246
246247 try {
247- const revalidateResponse = await ky . post (
248+ const revalidateResponse = await axios . post (
248249 `${ process . env . BETTER_AUTH_URL } /api/revalidate/path` ,
249250 {
250251 json : {
251- path : `/${ payload . organizationId } ` ,
252+ path : `${ process . env . BETTER_AUTH_URL } /${ payload . organizationId } ` ,
252253 secret : process . env . REVALIDATION_SECRET ,
253254 } ,
254255 } ,
255256 ) ;
256257
257- if ( ! revalidateResponse . ok ) {
258+ if ( ! revalidateResponse . data . ok ) {
258259 logger . error (
259260 `Failed to revalidate path: ${ revalidateResponse . statusText } ` ,
260261 ) ;
261- logger . error ( await revalidateResponse . json ( ) ) ;
262+ logger . error ( revalidateResponse . data ) ;
262263 }
263264 } catch ( err ) {
264265 logger . error ( "Error revalidating path" , { err } ) ;
You can’t perform that action at this time.
0 commit comments