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

fix(backend): fix changes on sql cmd in orders due to refacto of #70 #75

Merged
merged 1 commit into from
Sep 28, 2021

Conversation

DipandaAser
Copy link
Member

fix changes in sql cmd in orders due to refacto of #70

Why ?
After refacto the words orders has been changes by shop , so when we perform a GET on orders endpoints we got an error

SELECT "orders"."id","orders"."created_at","orders"."updated_at","orders"."deleted_at","orders"."wallet_id","orders"."total_amount","orders"."state","orders"."decision" FROM "orders" JOIN wallets on wallets.wallet_id = shop.w
allet_id and wallets.organisation_id = 1 WHERE state = 'not paid' AND "orders"."deleted_at" IS NULL LIMIT 999
2021/09/28 10:54:32 ERREUR: entrée manquante de la clause FROM pour la table « shop » (SQLSTATE 42P01); ERREUR: entrée manquante de la clause FROM pour la table « shop » (SQLSTATE 42P01)

How ?
Replace the word shop in sql cmd by orders in the file /backend/app/shop/orders/orders_db.go

Steps to verify:

$> make run
$> curl --location --request GET '127.0.0.1:9999/api/orders?limit=999&offset=0&state=not paid' \ --header 'Tenant: 1'

** Screenshots (optional)

Copy link
Member

@Sanix-Darker Sanix-Darker left a comment

Choose a reason for hiding this comment

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

Thanks for this PR !
I completely forgot to change that !

@DipandaAser DipandaAser merged commit 64acc5f into main Sep 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants