unhardcode base url (i think closes #3?)
This commit is contained in:
		
							parent
							
								
									36f4da4a28
								
							
						
					
					
						commit
						e218255441
					
				
					 1 changed files with 2 additions and 1 deletions
				
			
		|  | @ -59,7 +59,8 @@ export function run(app) { | ||||||
| 				res.send(`whoooops<br>${err}`); | 				res.send(`whoooops<br>${err}`); | ||||||
| 			} | 			} | ||||||
| 		} else { | 		} else { | ||||||
| 			res.send(`<a href="https://discord.com/api/oauth2/authorize?client_id=${process.env.DISCORD_OAUTH_CLIENTID}&redirect_uri=http%3A%2F%2Flocalhost%3A8080%2Fdiscordauth&response_type=code&scope=identify">Click here!!</a>`); | 			const url = `http://${req.headers.host}/discordauth`; | ||||||
|  | 			res.send(`<a href="https://discord.com/api/oauth2/authorize?client_id=${process.env.DISCORD_OAUTH_CLIENTID}&redirect_uri=${encodeURI(url)}&response_type=code&scope=identify">Click here!!</a>`); | ||||||
| 		} | 		} | ||||||
| 	}); | 	}); | ||||||
| } | } | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue