0
0
mirror of https://github.com/naturalcrit/homebrewery.git synced 2025-12-27 20:12:40 +00:00

change conditions for google error

This commit is contained in:
Gazook89
2021-11-21 10:58:41 -06:00
parent 0d685acfca
commit 7997698bcd
2 changed files with 4 additions and 4 deletions

View File

@@ -349,7 +349,7 @@ const EditPage = createClass({
</Nav.item>;
}
if(this.state.errors.status == '403' && this.state.errors.response.body.errors[0].reason == 'insufficientPermissions'){
if(this.state.errors.url.match(/^\/api\/.*Google.*$/m)){
return <Nav.item className='save error' icon='fas fa-exclamation-triangle'>
Oops!
<div className='errorContainer' onClick={this.clearErrors}>
@@ -360,7 +360,7 @@ const EditPage = createClass({
<a target='_blank' rel='noopener noreferrer'
href={`https://www.naturalcrit.com/login?redirect=${this.state.url}`}>
<div className='confirm'>
Sign In
Go to Log In Page
</div>
</a>
<div className='deny'>

View File

@@ -226,7 +226,7 @@ const NewPage = createClass({
</Nav.item>;
}
if(this.state.errors.status == '403' && this.state.errors.response.body.errors[0].reason == 'insufficientPermissions'){
if(this.state.errors.url.match(/^\/api\/.*Google.*$/m)){
return <Nav.item className='save error' icon='fas fa-exclamation-triangle'>
Oops!
<div className='errorContainer' onClick={this.clearErrors}>
@@ -237,7 +237,7 @@ const NewPage = createClass({
<a target='_blank' rel='noopener noreferrer'
href={`https://www.naturalcrit.com/login?redirect=${this.state.url}`}>
<div className='confirm'>
Sign In
Go to Log In Page
</div>
</a>
<div className='deny'>