Skip to content

Scrape Single function to firebase v2#2042

Open
AstorDG wants to merge 1 commit intocodeforboston:mainfrom
AstorDG:main
Open

Scrape Single function to firebase v2#2042
AstorDG wants to merge 1 commit intocodeforboston:mainfrom
AstorDG:main

Conversation

@AstorDG
Copy link
Collaborator

@AstorDG AstorDG commented Feb 3, 2026

Summary

  1. Added a v2 version of the scrape single hearing function that uses a firebase v2 function. The function signature is a bit different. OnCall is imported directly instead of from the https module and there is only one argument
  2. I changed the import names to mark the v1 firebase modules more clearly by adding /v1 to the end.
  3. Refactored the checkAuth and checkAdmin functions to take an argument of type CallableRequest or the old type: https.CallableContext.
  4. The front end now calls the v2 function in the Scrape Hearing Form Function.

Closes #2041

Known issues

I did also keep in the old scrape single hearing function but if this works as expected this is unnecessary and can be deleted.

Steps to test/reproduce

  1. I'm not actually sure how to invoke this function but it should be somewhere under the admin page of the hearings tab.

Implemented a v2 version of the scrape single hearing function. Changed
the frontend to call the v2 version. Updated the check auth and check
admin functions to be able to take a request object for both v1 and v2
firebase functino
@vercel
Copy link

vercel bot commented Feb 3, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
maple-dev Ready Ready Preview, Comment Feb 3, 2026 5:37pm

Request Review

Copy link
Collaborator

@kiminkim724 kiminkim724 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like it works from the admin page on local! But I think we could probably get rid of the v1 function, will defer to @Mephistic

Image Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate scrapeSingleHearing Firebase Function to V2

2 participants