Update index.ts
This commit is contained in:
		
							parent
							
								
									0dca4700fb
								
							
						
					
					
						commit
						f9e66f6d1d
					
				| @ -88,9 +88,9 @@ router.get("/vanity-url", async (req: Request, res: Response) => { | ||||
| 	const guild = await GuildModel.findOne({ id: guild_id }).exec(); | ||||
| 	if (!guild) throw new HTTPError("Guild does not exist", 404); | ||||
| 
 | ||||
| 	if(!guild.vanity_url_code) throw new HTTPError("This guild has no vanity url", 204) | ||||
| 	if(!guild.vanity_url) throw new HTTPError("This guild has no vanity url", 204) | ||||
| 
 | ||||
| 	return res.json(guild.vanity_url_code); | ||||
| 	return res.json(toObject(guild.vanity_url)); | ||||
| }); | ||||
| 
 | ||||
| export default router; | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Intevel ツ
						Intevel ツ