This commit is contained in:
Nicolas 2024-09-01 12:55:02 -03:00
parent 2ef43d5fc2
commit fe6abe8f7d
2 changed files with 7 additions and 1 deletions

View File

@ -12,6 +12,12 @@ export async function scrapeStatusController(req: any, res: any) {
const job = await supabaseGetJobByIdOnlyData(req.params.jobId);
if(job.team_id !== "41bdbfe1-0579-4d9b-b6d5-809f16be12f5"){
return res.status(403).json({
success: false,
error: "You are not allowed to access this resource.",
});
}
return res.status(200).json({
success: true,
data: job?.docs[0],

View File

@ -42,7 +42,7 @@ export const supabaseGetJobsById = async (jobIds: string[]) => {
export const supabaseGetJobByIdOnlyData = async (jobId: string) => {
const { data, error } = await supabase_service
.from("firecrawl_jobs")
.select("docs")
.select("docs, team_id")
.eq("job_id", jobId)
.single();