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:
Nicolas 2024-07-12 15:39:35 -04:00 committed by GitHub
commit f2a08e0ab8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 4 additions and 4 deletions

View File

@ -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) {

View File

@ -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) {

View File

@ -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 })

View File

@ -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;
}