Skip to content

Commit

Permalink
add content (#211)
Browse files Browse the repository at this point in the history
* feat(wepapp): add content from database for home route

* feat(hapi): return only ggoods with a small image

* feat(webapp): add block explorer env variable

* feat(hapi): add endpoint to return one ggood on sale

* refactor(hapi): return trxid for put on sale, create template and confirm sale actions

* feat(hasura): expose trxid for put on sale, create template and confirm sale actions

* feat(webapp): add empty message for my collection route

* refactor(webapp): organize queries for organizations

* feat(webapp): add util to get last characters from trxid

* feat(webapp): add link to trxid after a success donation

* feat(webapp): show trxid after publish a ggood

* fix(webapp): add missing link for "Browse goods" in home route

* feat(webapp): show trxid after create a template

* feat(webapp): implement custom upload template

* feat(webapp): implement avatar maker upload

* feat(webapp): reload ggoods after close modal

* fix(webapp): wrong markup after resolve conflicts

* fix(webapp): your collection carousel
  • Loading branch information
adriexnet authored Apr 3, 2021
1 parent f7fd733 commit b6e4ee0
Show file tree
Hide file tree
Showing 44 changed files with 1,204 additions and 739 deletions.
1 change: 1 addition & 0 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,4 @@ REACT_APP_HASURA_URL=http://localhost:8080/v1/graphql
REACT_APP_IPFS_URL=https://ipfs.smartholdem.io
REACT_APP_PAYPAL_CLIENT_ID=
REACT_CAPTCHA_KEY=
REACT_APP_BLOCK_EXPLORER=https://jungle3.bloks.io/transaction/{transaction}
1 change: 1 addition & 0 deletions .github/workflows/push-dev-environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ jobs:
REACT_APP_HASURA_URL: https://graphql.ggoods.io:8080/v1/graphql
REACT_APP_IPFS_URL: https://ipfs.smartholdem.io
REACT_APP_PAYPAL_CLIENT_ID: ""
REACT_APP_BLOCK_EXPLORER: "https://jungle3.bloks.io/transaction/{transaction}"

- name: Build kubernetes files
id: build_kubernetes_files
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/push-main-environment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ jobs:
REACT_APP_IPFS_URL: ${{ secrets.REACT_APP_IPFS_URL }}
REACT_APP_PAYPAL_CLIENT_ID: ${{ secrets.REACT_APP_PAYPAL_CLIENT_ID }}
REACT_CAPTCHA_KEY: ${{ secrets.REACT_CAPTCHA_KEY }}
REACT_APP_BLOCK_EXPLORER: ${{ secrets.REACT_APP_BLOCK_EXPLORER }}

# hasura
HASURA_GRAPHQL_DATABASE_URL: ${{ secrets.HASURA_GRAPHQL_DATABASE_URL }}
Expand Down Expand Up @@ -157,6 +158,7 @@ jobs:
REACT_APP_IPFS_URL: ${{ secrets.REACT_APP_IPFS_URL }}
REACT_APP_PAYPAL_CLIENT_ID: ${{ secrets.REACT_APP_PAYPAL_CLIENT_ID }}
REACT_CAPTCHA_KEY: ${{ secrets.REACT_CAPTCHA_KEY }}
REACT_APP_BLOCK_EXPLORER: ${{ secrets.REACT_APP_BLOCK_EXPLORER }}

- name: Deploy kubernetes files
run: |
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -97,3 +97,4 @@ services:
REACT_APP_IPFS_URL: '${REACT_APP_IPFS_URL}'
REACT_APP_PAYPAL_CLIENT_ID: '${REACT_APP_PAYPAL_CLIENT_ID}'
REACT_CAPTCHA_KEY: '${REACT_CAPTCHA_KEY}'
REACT_APP_BLOCK_EXPLORER: '${REACT_APP_BLOCK_EXPLORER}'
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@ const { nftService } = require('../services')

module.exports = {
method: 'POST',
path: '/nft-on-sale',
handler: ({ payload: { input } }) => nftService.nftOnSale(input),
path: '/ggood-on-sale',
handler: ({ payload: { input } }) => nftService.ggoodOnSale(input.id),
options: {
validate: {
payload: Joi.object({
input: Joi.object({
seller: Joi.string().allow('').optional()
id: Joi.number().required()
}).optional()
}).options({ stripUnknown: true })
},
Expand Down
20 changes: 20 additions & 0 deletions hapi/src/routes/ggoods-on-sale.route.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
const Joi = require('joi')

const { nftService } = require('../services')

module.exports = {
method: 'POST',
path: '/ggoods-on-sale',
handler: ({ payload: { input } }) => nftService.ggoodsOnSale(input),
options: {
validate: {
payload: Joi.object({
input: Joi.object({
seller: Joi.string().allow('').optional(),
limit: Joi.number().optional().default(100)
}).optional()
}).options({ stripUnknown: true })
},
auth: false
}
}
26 changes: 14 additions & 12 deletions hapi/src/routes/index.js
Original file line number Diff line number Diff line change
@@ -1,29 +1,31 @@
const confirmSaleWithPaypalRoute = require('./confirm-sale-with-paypal.route')
const createTemplateRoute = require('./create-template.route')
const ggoodOnSaleRoute = require('./ggood-on-sale.route')
const ggoodsOnSaleRoute = require('./ggoods-on-sale.route')
const healthzRoute = require('./healthz.route')
const myGGoodsRoute = require('./my-ggoods.route')
const putOnSaleRoute = require('./put-on-sale.route')
const createAccountRoute = require('./create-account/create-account.route')
const createAccountOrganization = require('./create-account-organization/create-account-organization.route')
const preRegisterOrganization = require('./pre-register-organization/pre-register-organization.route')
const verifyEmailRouteRoute = require('./verify-email/verify-email.route')
const loginRoute = require('./login/login.route')
const createTemplateRoute = require('./create-template.route')
const healthzRoute = require('./healthz.route')
const myGGoodsRoute = require('./my-ggoods.route')
const nftOnSaleRoute = require('./nft-on-sale.route')
const confirmSaleWithPaypalRoute = require('./confirm-sale-with-paypal.route')
const putOnSaleRoute = require('./put-on-sale.route')
const credentialsRecovery = require('./credentials-recovery/credentials-recovery.route')
const changePassword = require('./change-password/change-password.route')

module.exports = [
confirmSaleWithPaypalRoute,
createTemplateRoute,
ggoodOnSaleRoute,
ggoodsOnSaleRoute,
healthzRoute,
myGGoodsRoute,
putOnSaleRoute,
createAccountRoute,
createAccountOrganization,
preRegisterOrganization,
verifyEmailRouteRoute,
loginRoute,
createTemplateRoute,
healthzRoute,
myGGoodsRoute,
nftOnSaleRoute,
putOnSaleRoute,
confirmSaleWithPaypalRoute,
credentialsRecovery,
changePassword
]
14 changes: 13 additions & 1 deletion hapi/src/routes/my-ggoods.route.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,19 @@
const Joi = require('joi')

const { nftService } = require('../services')

module.exports = {
method: 'POST',
path: '/my-ggoods',
handler: ({ auth: { credentials } }) => nftService.myGGoods(credentials)
handler: ({ auth: { credentials }, payload: { input } }) =>
nftService.myGGoods(credentials, input),
options: {
validate: {
payload: Joi.object({
input: Joi.object({
limit: Joi.number().optional().default(100)
}).optional()
}).options({ stripUnknown: true })
}
}
}
Loading

0 comments on commit b6e4ee0

Please sign in to comment.