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

refactor the code phase1 NEEDS DISCUSSIONS #106

Merged
merged 4 commits into from
Jul 23, 2024

Conversation

Kholoudxs55kh
Copy link
Member

No description provided.

@Kholoudxs55kh Kholoudxs55kh self-assigned this Jul 14, 2024
@Kholoudxs55kh Kholoudxs55kh linked an issue Jul 14, 2024 that may be closed by this pull request
Copy link

@eimaam eimaam left a comment

Choose a reason for hiding this comment

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

Good piece.
Left some comments.

count = searchResult.count;
}

res.status(201).json({ nodes, count });
Copy link

Choose a reason for hiding this comment

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

the right status code here should be 200 as 201 is for creating new resource.
Can we update that pls.

Suggested change
res.status(201).json({ nodes, count });
res.status(200).json({ nodes, count });

Comment on lines 29 to 32
console.log("====imgs===", images);
console.log(name);
console.log(userId);
console.log("===rest===", rest);
Copy link

Choose a reason for hiding this comment

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

Lets do away with the logs if not needful.

console.log("===rest===", rest);
const createdClaim = await prisma.claim.create({
data: {
issuerId: `http://trustclaims.whatscookin.us/users/${userId}`,
Copy link

Choose a reason for hiding this comment

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

Recommending we store the baseURL (https://trustclaims.whatscookin.us) used in the issuerId here in an environment variable. This would enhance maintainability by enabling us to modify the URL centrally in case of future changes (e.g., domain migration, API updates) etc...

edgesTo: {
some: {
claim: {
issuerId: `http://trustclaims.whatscookin.us/users/${userId}`,
Copy link

Choose a reason for hiding this comment

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

ditto ^^

@Kholoudxs55kh Kholoudxs55kh removed the request for review from gvelez17 July 23, 2024 14:06
Copy link
Contributor

@AhmedAbdelmenam AhmedAbdelmenam left a comment

Choose a reason for hiding this comment

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

done

@Kholoudxs55kh Kholoudxs55kh merged commit e400f44 into dev Jul 23, 2024
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.

Refactor phase1
3 participants