Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(lamda): add admin function for NOSOs #990

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft

Conversation

andieswift
Copy link
Collaborator

@andieswift andieswift commented Jan 8, 2025

🎫 Linked Ticket

OY2-31182

💬 Description / Notes

🛠 Changes

📸 Screenshots / Demo

@andieswift andieswift self-assigned this Jan 8, 2025
@andieswift andieswift added the status: NOT READY PR ain't ready label Jan 8, 2025
Copy link
Contributor

github-actions bot commented Jan 8, 2025

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 75.83% 6569 / 8662
🔵 Statements 74.99% 6883 / 9178
🔵 Functions 69.49% 1975 / 2842
🔵 Branches 44.69% 1244 / 2783
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
lib/lambda/sinkChangelog.ts 0% 0% 0% 0% 16-144
lib/lambda/sinkMainProcessors.ts 97.14% 95.23% 100% 97.11% 57-65
lib/lambda/submit/submitNOSO.ts 15.38% 0% 0% 16% 16-21, 29-48, 52-96
Generated in workflow #1408 for commit aed0139 by the Vitest Coverage Report Action

// check if the package already exists; if it does shoudl not add new record
if (currentPackage) {
return response({
statusCode: 404,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Doesn't 404 mean Not Found?

Comment on lines +59 to +63
const parseEventBody = (body: unknown) => {
return submitNOSOAdminSchema.parse(typeof body === "string" ? JSON.parse(body) : body);
};

const { packageId, action } = parseEventBody(event.body);
Copy link
Collaborator

@asharonbaltazar asharonbaltazar Jan 9, 2025

Choose a reason for hiding this comment

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

Would it make sense to just call submitNOSOAdminSchema.parse without abstracting it into a function?

@asharonbaltazar
Copy link
Collaborator

Woops, didn't see the NOT READY badge. Ignore my comments 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: NOT READY PR ain't ready
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants