mirror of
https://github.com/xaionaro-go/streamctl.git
synced 2025-10-13 03:03:44 +08:00
Initial commit, pt. 12
This commit is contained in:
@@ -82,7 +82,11 @@ func NewCodeReceiver(redirectURL string) (codeCh chan string, err error) {
|
||||
codeCh <- code
|
||||
listener.Close()
|
||||
w.Header().Set("Content-Type", "text/plain")
|
||||
fmt.Fprintf(w, "Received code: %v\r\nYou can now safely close this browser window.", code)
|
||||
if code == "" {
|
||||
fmt.Fprintf(w, "No code received :(\r\n\r\nYou can close this browser window.")
|
||||
return
|
||||
}
|
||||
fmt.Fprintf(w, "Received code: %v\r\n\r\nYou can now safely close this browser window.", code)
|
||||
}))
|
||||
|
||||
return codeCh, nil
|
||||
|
Reference in New Issue
Block a user