You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
follow same pattern as server/src/assets/assets.controller.ts line ~40,41 (get endpoint)
create a new endpoint in organization controller that allows us to get a list of orgs and filters them based on some inputs (query params)
example url localhost:3001/api/organizations?name=my%20org
might need to replace findAll but without the query params (localhost:3001/api/organizations) it should still respond with all orgs
probs build a new DTO filterOrganizationsDto or something
use https://typeorm.io/find-options to decide on correct getter function to get data from organizationsRepository (db accessor)
follow same pattern as
server/src/assets/assets.controller.ts
line ~40,41 (get
endpoint)create a new endpoint in organization controller that allows us to get a list of orgs and filters them based on some inputs (query params)
example url
localhost:3001/api/organizations?name=my%20org
might need to replace
findAll
but without the query params (localhost:3001/api/organizations
) it should still respond with all orgsprobs build a new DTO
filterOrganizationsDto
or somethinguse https://typeorm.io/find-options to decide on correct getter function to get data from organizationsRepository (db accessor)
curl command examples: #92
create some fake data to test with (
cd server
)npm run seed:drop
(where seed data comes from
server/src/database/seeding/seed-data.ts
)Examples to look at:
This is a good example, but instead of having a
getTransactionsDTO
as a parameter, use something likeorgName
web-app/server/src/transactions/transactions.controller.ts
Lines 18 to 21 in affb27d
AC:
name
for nowThe text was updated successfully, but these errors were encountered: