Nick:
This commit is contained in:
@@ -12,6 +12,12 @@ export async function scrapeStatusController(req: any, res: any) {
|
|||||||
|
|
||||||
const job = await supabaseGetJobByIdOnlyData(req.params.jobId);
|
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({
|
return res.status(200).json({
|
||||||
success: true,
|
success: true,
|
||||||
data: job?.docs[0],
|
data: job?.docs[0],
|
||||||
|
|||||||
@@ -42,7 +42,7 @@ export const supabaseGetJobsById = async (jobIds: string[]) => {
|
|||||||
export const supabaseGetJobByIdOnlyData = async (jobId: string) => {
|
export const supabaseGetJobByIdOnlyData = async (jobId: string) => {
|
||||||
const { data, error } = await supabase_service
|
const { data, error } = await supabase_service
|
||||||
.from("firecrawl_jobs")
|
.from("firecrawl_jobs")
|
||||||
.select("docs")
|
.select("docs, team_id")
|
||||||
.eq("job_id", jobId)
|
.eq("job_id", jobId)
|
||||||
.single();
|
.single();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user