mirror of
https://github.com/mendableai/firecrawl.git
synced 2024-11-16 03:32:22 +08:00
Merge pull request #395 from kun432/kun432/fix-use-db-auth-check-for-selfhost
Fix USE_DB_AUTHENTICATION checks for self-host
This commit is contained in:
commit
f2a08e0ab8
|
@ -23,7 +23,7 @@ export async function crawlStatusController(req: Request, res: Response) {
|
|||
const { current, current_url, total, current_step, partialDocs } = await job.progress();
|
||||
|
||||
let data = job.returnvalue;
|
||||
if (process.env.USE_DB_AUTHENTICATION) {
|
||||
if (process.env.USE_DB_AUTHENTICATION === "true") {
|
||||
const supabaseData = await supabaseGetJobById(req.params.jobId);
|
||||
|
||||
if (supabaseData) {
|
||||
|
|
|
@ -11,7 +11,7 @@ export async function crawlJobStatusPreviewController(req: Request, res: Respons
|
|||
|
||||
const { current, current_url, total, current_step, partialDocs } = await job.progress();
|
||||
let data = job.returnvalue;
|
||||
if (process.env.USE_DB_AUTHENTICATION) {
|
||||
if (process.env.USE_DB_AUTHENTICATION === "true") {
|
||||
const supabaseData = await supabaseGetJobById(req.params.jobId);
|
||||
|
||||
if (supabaseData) {
|
||||
|
|
|
@ -111,7 +111,7 @@ export async function runWebScraper({
|
|||
|
||||
const saveJob = async (job: Job, result: any) => {
|
||||
try {
|
||||
if (process.env.USE_DB_AUTHENTICATION) {
|
||||
if (process.env.USE_DB_AUTHENTICATION === "true") {
|
||||
const { data, error } = await supabase_service
|
||||
.from("firecrawl_jobs")
|
||||
.update({ docs: result })
|
||||
|
|
|
@ -6,7 +6,7 @@ import "dotenv/config";
|
|||
|
||||
export async function logJob(job: FirecrawlJob) {
|
||||
try {
|
||||
if (!process.env.USE_DB_AUTHENTICATION) {
|
||||
if (process.env.USE_DB_AUTHENTICATION === "false") {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user