Merge pull request #61 from AdvancedAlgos/develop
Add Shared Key with AAWeb + Client Updates
This commit is contained in:
7 files changed
+44
-7
No files matched your search
@@ -64,7 +64,7 @@ export const resolvers = {
|
||||
// const platformUrl = 'http://localhost:1337/AABrowserAPI/teamSetup/'
|
||||
|
||||
logger.info(`${platformUrl}${createTeamUrl}/${authId}`)
|
||||
const createPlatformTeam = await axios.get(`${platformUrl}${createTeamUrl}/${authId}`)
|
||||
const createPlatformTeam = await axios.get(`${platformUrl}${createTeamUrl}/${authId}/${process.env.AAWEB_TEAM_SHARED_SECRET}`)
|
||||
.then((result) => {
|
||||
console.log('createPlatformTeam result:', result.data)
|
||||
if(result.data.message === 'Team Name already taken'){
|
||||
@@ -148,7 +148,7 @@ export const resolvers = {
|
||||
|
||||
const alias = await result.data.users_User.alias
|
||||
// const email = result.data.users_User.email
|
||||
const deleteTeamUrl = encodeURI(`${slug}/${alias}/${botSlug}`)
|
||||
const deleteTeamUrl = encodeURI(`${slug}/${alias}/${botSlug}/${process.env.AAWEB_DELETE_TEAM_SHARED_SECRET}`)
|
||||
logger.info('deleteTeamUrl:')
|
||||
logger.info(JSON.stringify(await deleteTeamUrl))
|
||||
|
||||
|
||||
Generated
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@advancedalgos/teams-client",
|
||||
"version": "0.0.24",
|
||||
"version": "0.0.26",
|
||||
"lockfileVersion": 1,
|
||||
"requires": true,
|
||||
"dependencies": {
|
||||
|
||||
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@advancedalgos/teams-client",
|
||||
"version": "0.0.26",
|
||||
"version": "0.0.27",
|
||||
"description": "Advanced Algos Team client-side web app",
|
||||
"main": "src/index.js",
|
||||
"scripts": {
|
||||
|
||||
+3
-1
@@ -11,6 +11,7 @@ import {
|
||||
FinancialBeings,
|
||||
Settings,
|
||||
Teams,
|
||||
Landing,
|
||||
globalStyles
|
||||
} from './views'
|
||||
|
||||
@@ -37,7 +38,8 @@ class App extends Component {
|
||||
return (
|
||||
<div className='App'>
|
||||
<Switch>
|
||||
<Route exact path={`/teams`} component={Teams} />
|
||||
<Route exact path={`/teams`} component={Landing} />
|
||||
<Route exact path={`/teams/explore`} component={Teams} />
|
||||
<Route
|
||||
exact
|
||||
path={`/teams/manage-teams`}
|
||||
|
||||
@@ -4,6 +4,7 @@ import FinancialBeings from './financial-beings'
|
||||
import Settings from './settings'
|
||||
import Teams from './teams'
|
||||
import AcceptTeamInvite from './teams/AcceptTeamInvite'
|
||||
import Landing from './landing'
|
||||
|
||||
import { TeamBar } from './common'
|
||||
|
||||
@@ -17,6 +18,7 @@ export {
|
||||
Settings,
|
||||
Teams,
|
||||
TeamBar,
|
||||
Landing,
|
||||
theme,
|
||||
globalStyles
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
import React from 'react'
|
||||
import PropTypes from 'prop-types'
|
||||
|
||||
import { withStyles } from '@material-ui/core/styles'
|
||||
|
||||
import { BannerTopBar } from '../common'
|
||||
|
||||
const styles = theme => ({
|
||||
container: {
|
||||
width: 'auto',
|
||||
marginTop: theme.spacing.unit * 3,
|
||||
marginLeft: theme.spacing.unit * 3,
|
||||
marginRight: theme.spacing.unit * 3,
|
||||
marginBottom: theme.spacing.unit * 6,
|
||||
[theme.breakpoints.up(800 + theme.spacing.unit * 3 * 2)]: {
|
||||
width: 800,
|
||||
marginLeft: 'auto',
|
||||
marginRight: 'auto'
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
const Landing = ({ classes, ...props }) => (
|
||||
<div>
|
||||
<BannerTopBar size='big' title='Teams Module' text='Create and manage your Advanced Algos teams' backgroundUrl='https://advancedalgos.net/img/photos/teams.jpg' />
|
||||
</div>
|
||||
)
|
||||
|
||||
Landing.propTypes = {
|
||||
classes: PropTypes.object.isRequired
|
||||
}
|
||||
|
||||
export default withStyles(styles)(Landing)
|
||||
@@ -36,10 +36,10 @@ export const TeamsItem = ({ classes, team }) => {
|
||||
/>
|
||||
<CardContent className={classes.cardContent}>
|
||||
<Grid container>
|
||||
<Grid md={3}>
|
||||
<Grid item md={3}>
|
||||
<img src={avatar} alt={team.name} className={classes.avatar} />
|
||||
</Grid>
|
||||
<Grid md={9}>
|
||||
<Grid item md={9}>
|
||||
<Typography gutterBottom variant='h5' component='h2'>
|
||||
{team.name}
|
||||
</Typography>
|
||||
|
||||
Reference in new issue
Block a user