Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit2c9fb64

Browse files
committed
Fix unused method receiver
1 parent18523d5 commit2c9fb64

File tree

3 files changed

+7
-20
lines changed

3 files changed

+7
-20
lines changed

‎cli/create_test.go

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -701,35 +701,28 @@ func createTestParseResponseWithDefault(defaultValue string) []*proto.Parse_Resp
701701
}
702702

703703
typeoauth2Configstruct {
704-
token*oauth2.Token
705704
}
706705

707706
func (*oauth2Config)AuthCodeURL(statestring,_...oauth2.AuthCodeOption)string {
708707
return"/?state="+url.QueryEscape(state)
709708
}
710709

711-
func (o*oauth2Config)Exchange(context.Context,string,...oauth2.AuthCodeOption) (*oauth2.Token,error) {
710+
func (*oauth2Config)Exchange(context.Context,string,...oauth2.AuthCodeOption) (*oauth2.Token,error) {
712711
return&oauth2.Token{
713712
AccessToken:"token",
714713
RefreshToken:"refresh",
715714
Expiry:database.Now().Add(time.Hour),
716715
},nil
717716
}
718717

719-
func (o*oauth2Config)TokenSource(context.Context,*oauth2.Token) oauth2.TokenSource {
720-
return&oauth2TokenSource{
721-
token:o.token,
722-
}
718+
func (*oauth2Config)TokenSource(context.Context,*oauth2.Token) oauth2.TokenSource {
719+
return&oauth2TokenSource{}
723720
}
724721

725722
typeoauth2TokenSourcestruct {
726-
token*oauth2.Token
727723
}
728724

729-
func (o*oauth2TokenSource)Token() (*oauth2.Token,error) {
730-
ifo.token!=nil {
731-
returno.token,nil
732-
}
725+
func (*oauth2TokenSource)Token() (*oauth2.Token,error) {
733726
return&oauth2.Token{
734727
AccessToken:"token",
735728
RefreshToken:"refresh",

‎site/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,6 @@
136136
"chrome 66",
137137
"firefox 63",
138138
"edge 79",
139-
"safari 15.4"
139+
"safari 15.5"
140140
]
141141
}

‎site/src/pages/GitAuthPage/GitAuthPage.tsx

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,25 +3,19 @@ import { makeStyles } from "@material-ui/core/styles"
33
import{SignInLayout}from"components/SignInLayout/SignInLayout"
44
import{Welcome}from"components/Welcome/Welcome"
55
import{FC,useEffect}from"react"
6-
import{LinkasRouterLink,useSearchParams}from"react-router-dom"
6+
import{LinkasRouterLink}from"react-router-dom"
77
import{REFRESH_GITAUTH_BROADCAST_CHANNEL}from"xServices/createWorkspace/createWorkspaceXService"
88

99
constGitAuthPage:FC=()=>{
1010
conststyles=useStyles()
11-
const[searchParams]=useSearchParams()
12-
constshouldNotify=searchParams.has("notify")
1311
useEffect(()=>{
14-
if(!shouldNotify){
15-
return
16-
}
17-
1812
// This is used to notify the parent window that the Git auth token has been refreshed.
1913
// It's critical in the create workspace flow!
2014
constbc=newBroadcastChannel(REFRESH_GITAUTH_BROADCAST_CHANNEL)
2115
// The message doesn't matter, any message refreshes the page!
2216
bc.postMessage("noop")
2317
window.close()
24-
},[shouldNotify])
18+
},[])
2519

2620
return(
2721
<SignInLayout>

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp