Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/dev' into generate-toml
Browse files Browse the repository at this point in the history
# Conflicts:
#	backend/migrations/000027_asset_image.down.sql
#	backend/migrations/000027_asset_image.up.sql
  • Loading branch information
lucasmagnus committed Oct 10, 2023
2 parents 80f58f8 + 402856a commit 2cb7000
Show file tree
Hide file tree
Showing 122 changed files with 2,723 additions and 848 deletions.
1 change: 1 addition & 0 deletions .github/workflows/frontend-cicd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ jobs:
build-args: |
REACT_APP_API_URL=${{ vars.REACT_APP_API_URL }}
REACT_APP_SENTRY_DSN=${{ secrets.REACT_APP_SENTRY_DSN }}
REACT_APP_PUBLIC_URL=${{ vars.REACT_APP_PUBLIC_URL }}
outputs: type=docker,dest=/tmp/docker_image.tar

- name: Upload artifact
Expand Down
30 changes: 30 additions & 0 deletions backend/internal/usecase/mocks/mocks.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions backend/internal/usecase/repo/asset_postgres.go
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,8 @@ func (r AssetRepo) GetAssetByCode(code string) (entity.Asset, error) {

func (r AssetRepo) CreateAsset(data entity.Asset) (entity.Asset, error) {
res := data
stmt := `INSERT INTO Asset (code, issuer_id, distributor_id, name, asset_type) VALUES ($1, $2, $3,$4, $5) RETURNING id;`
err := r.Db.QueryRow(stmt, data.Code, data.Issuer.Id, data.Distributor.Id, data.Name, data.AssetType).Scan(&res.Id)
stmt := `INSERT INTO Asset (code, issuer_id, distributor_id, name, asset_type, image) VALUES ($1, $2, $3,$4, $5, $6) RETURNING id;`
err := r.Db.QueryRow(stmt, data.Code, data.Issuer.Id, data.Distributor.Id, data.Name, data.AssetType, data.Image).Scan(&res.Id)
if err != nil {
return entity.Asset{}, fmt.Errorf("AssetRepo - CreateAsset - db.QueryRow: %w", err)
}
Expand Down
1 change: 1 addition & 0 deletions backend/migrations/000027_asset_image.down.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE asset DROP COLUMN image;
1 change: 1 addition & 0 deletions backend/migrations/000027_asset_image.up.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ALTER TABLE asset ADD COLUMN image BYTEA;
48 changes: 47 additions & 1 deletion frontend/.idea/workspace.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions frontend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@ ENTRYPOINT [ "make", "start_dev"]
FROM base AS builder
ARG REACT_APP_API_URL
ARG REACT_APP_SENTRY_DSN
ARG REACT_APP_PUBLIC_URL
ENV REACT_APP_API_URL=${REACT_APP_API_URL:?"ERR: REACT_APP_API_URL not set in Dockerfile"}
ENV REACT_APP_SENTRY_DSN=${REACT_APP_SENTRY_DSN:?"ERR: REACT_APP_SENTRY_DSN not set in Dockerfile"}
ENV PUBLIC_URL=${REACT_APP_PUBLIC_URL:?"ERR: REACT_APP_PUBLIC_URL not set in Dockerfile"}
RUN make build

FROM node:16.13-bullseye-slim AS remote
Expand Down
Loading

0 comments on commit 2cb7000

Please sign in to comment.