Skip to content

add projects to the frontend#174

Open
pheobeayo wants to merge 7 commits intomainfrom
fix/add-projects-to-frontend
Open

add projects to the frontend#174
pheobeayo wants to merge 7 commits intomainfrom
fix/add-projects-to-frontend

Conversation

@pheobeayo
Copy link
Copy Markdown
Collaborator

fixes #166

  • added the projects implementation in the backend to the frontend

Copy link
Copy Markdown
Contributor

@joelamouche joelamouche left a comment

Choose a reason for hiding this comment

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

Overall looks good but I wasn't able to test, see comment

id: string;
name: string;
description: string;
owner_address: string;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

If you look at backend/src/application/dtos/project_dtos.rs you will see that the api doesn't return owner_address.
This is why when testing locally I get

Image

Also if I look at backend/migrations/004_create_projects_table.sql I can see this field is not in the db either.

Please add owner_address in the backend to fix this pb.

Also, in the future, pls run and test locally your app before posting a PR.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Okay, I will work on it

Copy link
Copy Markdown
Contributor

@joelamouche joelamouche left a comment

Choose a reason for hiding this comment

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

I can't stress this enough: you need to test features locally before submitting a PR for review


export type CreateProjectData = {
name: string;
description: string;
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

status is missing here but required in backend/src/application/dtos/project_dtos.rs whichy is why I'm getting this

Image

Copy link
Copy Markdown
Contributor

@joelamouche joelamouche left a comment

Choose a reason for hiding this comment

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

A little comment on db migrations

description TEXT NOT NULL,
status VARCHAR(50) NOT NULL CHECK (status IN ('proposal', 'ongoing', 'rejected')),
creator VARCHAR(42) NOT NULL,
owner_address VARCHAR(42) GENERATED ALWAYS AS (creator) STORED,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Be careful not to modify existing migrations because this will cause a bug when deploying to prod. Always add new migration files

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Adding a new migration was responsible for the errors, that was why the checks were not passing. But if I need to add new ones, I will have to work on it.

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.

Add projects to the front end

2 participants