changed to mux so I can run sequentially.
This commit is contained in:
		@@ -69,8 +69,9 @@ func (a *App) AniListLogin() {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func handleAniListCallback(wg *sync.WaitGroup) {
 | 
					func handleAniListCallback(wg *sync.WaitGroup) {
 | 
				
			||||||
	srv := &http.Server{Addr: ":6734"}
 | 
						mux := http.NewServeMux()
 | 
				
			||||||
	http.HandleFunc("/callback", func(w http.ResponseWriter, r *http.Request) {
 | 
						srv := &http.Server{Addr: ":6734", Handler: mux}
 | 
				
			||||||
 | 
						mux.HandleFunc("/callback", func(w http.ResponseWriter, r *http.Request) {
 | 
				
			||||||
		select {
 | 
							select {
 | 
				
			||||||
		case <-aniCtxShutdown.Done():
 | 
							case <-aniCtxShutdown.Done():
 | 
				
			||||||
			fmt.Println("Shutting down...")
 | 
								fmt.Println("Shutting down...")
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -116,8 +116,9 @@ func (a *App) MyAnimeListLogin() {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func handleMyAnimeListCallback(wg *sync.WaitGroup, verifier *CodeVerifier) {
 | 
					func handleMyAnimeListCallback(wg *sync.WaitGroup, verifier *CodeVerifier) {
 | 
				
			||||||
	srv := &http.Server{Addr: ":6734"}
 | 
						mux := http.NewServeMux()
 | 
				
			||||||
	http.HandleFunc("/callback", func(w http.ResponseWriter, r *http.Request) {
 | 
						srv := &http.Server{Addr: ":6734", Handler: mux}
 | 
				
			||||||
 | 
						mux.HandleFunc("/callback", func(w http.ResponseWriter, r *http.Request) {
 | 
				
			||||||
		select {
 | 
							select {
 | 
				
			||||||
		case <-myAnimeListCtxShutdown.Done():
 | 
							case <-myAnimeListCtxShutdown.Done():
 | 
				
			||||||
			fmt.Println("Shutting down...")
 | 
								fmt.Println("Shutting down...")
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -63,8 +63,9 @@ func (a *App) SimklLogin() {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func handleSimklCallback(wg *sync.WaitGroup) {
 | 
					func handleSimklCallback(wg *sync.WaitGroup) {
 | 
				
			||||||
	srv := &http.Server{Addr: ":6734"}
 | 
						mux := http.NewServeMux()
 | 
				
			||||||
	http.HandleFunc("/callback", func(w http.ResponseWriter, r *http.Request) {
 | 
						srv := &http.Server{Addr: ":6734", Handler: mux}
 | 
				
			||||||
 | 
						mux.HandleFunc("/callback", func(w http.ResponseWriter, r *http.Request) {
 | 
				
			||||||
		select {
 | 
							select {
 | 
				
			||||||
		case <-simklCtxShutdown.Done():
 | 
							case <-simklCtxShutdown.Done():
 | 
				
			||||||
			fmt.Println("Shutting down...")
 | 
								fmt.Println("Shutting down...")
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user