add renderings table. Move gateway to walangmeta. Rename some properties…#5
Open
add renderings table. Move gateway to walangmeta. Rename some properties…#5
Conversation
Deploying languageapi with
|
| Latest commit: |
8f7c4f5
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://79491075.languageapi.pages.dev |
| Branch Preview URL: | https://wk-glchange.languageapi.pages.dev |
PurpleGuitar
approved these changes
Mar 7, 2024
wkelly17
commented
Mar 26, 2024
Comment on lines
+66
to
+88
| const doesExist = await checkContentExists(`${namespace}-${id}`); | ||
| if (!doesExist) { | ||
| context.log( | ||
| `${namespace}-${id} is not already in api. Creating new row in table` | ||
| ); | ||
| const newContentRow: z.infer<typeof validators.contentPost> = [ | ||
| { | ||
| namespace: "wacs", | ||
| id: `${parsed.User}/${parsed.Repo}`.toLowerCase(), | ||
| type: "text", | ||
| }, | ||
| ]; | ||
| const newRowRes = await handleContentPost(newContentRow); | ||
| if (newRowRes.status !== 200) { | ||
| context.log( | ||
| `Failed to create new content row for ${`${parsed.User}/${parsed.Repo}`.toLowerCase()}` | ||
| ); | ||
| throw new Error( | ||
| `Failed to create new content row for ${`${parsed.User}/${parsed.Repo}`.toLowerCase()}` | ||
| ); | ||
| } | ||
| } | ||
|
|
Contributor
Author
There was a problem hiding this comment.
@PurpleGuitar , @danparisd - Here is the logic for creating a content row in the db if it doesn't exist before proceeding to try to adjust add all the blobs/renders of that content
| `received a message for ${parsed.Repo} of event type ${parsed.EventType}` | ||
| `GIT BUS RECEIVED: received a message for ${parsed.Repo} of event type ${parsed.EventType}` | ||
| ); | ||
| const thatContentRowExists = await checkContentExists( |
Contributor
Author
There was a problem hiding this comment.
Same logic here since these also have an fk to content and receive bus messages
PurpleGuitar
approved these changes
Mar 26, 2024
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Several Things of note in here: .
If y'all want to look at it locally, I'm fine to meet on it and show what different explorer looks like (the explorer on cloudflare pages below is pointing at dev, we don't have a preview db). Or if you just want to spin it up locally and take a look, I'm fine to help with any of that too.
Outstanding:
@rbnswartz is fixing some pathing issues for the rendered files.