Compare commits
	
		
			3 Commits
		
	
	
		
			7c067839af
			...
			dev
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 
						
						
							
						
						26ad821bc0
	
				 | 
					
					
						|||
| 
						
						
							
						
						9f0ebe81e3
	
				 | 
					
					
						|||
| 
						
						
							
						
						67cd6cb3cf
	
				 | 
					
					
						
@@ -80,6 +80,7 @@ func InitRouters(router *gin.Engine, db *gorm.DB, meta *ServerMeta, smtpCfg *ser
 | 
				
			|||||||
	minecraftservices := router.Group("/minecraftservices")
 | 
						minecraftservices := router.Group("/minecraftservices")
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		minecraftservices.GET("/player/attributes", userRouter.PlayerAttributes)
 | 
							minecraftservices.GET("/player/attributes", userRouter.PlayerAttributes)
 | 
				
			||||||
 | 
							minecraftservices.GET("/privacy/blocklist", userRouter.PlayerBlockList)
 | 
				
			||||||
		minecraftservices.POST("/player/certificates", userRouter.ProfileKey)
 | 
							minecraftservices.POST("/player/certificates", userRouter.ProfileKey)
 | 
				
			||||||
		minecraftservices.GET("/publickeys", homeRouter.PublicKeys)
 | 
							minecraftservices.GET("/publickeys", homeRouter.PublicKeys)
 | 
				
			||||||
		minecraftservices.GET("/minecraft/profile/lookup/:uuid", userRouter.UUIDToUUID)
 | 
							minecraftservices.GET("/minecraft/profile/lookup/:uuid", userRouter.UUIDToUUID)
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -39,6 +39,7 @@ type UserRouter interface {
 | 
				
			|||||||
	QueryUUIDs(c *gin.Context)
 | 
						QueryUUIDs(c *gin.Context)
 | 
				
			||||||
	QueryProfile(c *gin.Context)
 | 
						QueryProfile(c *gin.Context)
 | 
				
			||||||
	PlayerAttributes(c *gin.Context)
 | 
						PlayerAttributes(c *gin.Context)
 | 
				
			||||||
 | 
						PlayerBlockList(c *gin.Context)
 | 
				
			||||||
	ProfileKey(c *gin.Context)
 | 
						ProfileKey(c *gin.Context)
 | 
				
			||||||
	SendEmail(c *gin.Context)
 | 
						SendEmail(c *gin.Context)
 | 
				
			||||||
	VerifyEmail(c *gin.Context)
 | 
						VerifyEmail(c *gin.Context)
 | 
				
			||||||
@@ -303,11 +304,21 @@ func (u *userRouterImpl) QueryProfile(c *gin.Context) {
 | 
				
			|||||||
func (u *userRouterImpl) PlayerAttributes(c *gin.Context) {
 | 
					func (u *userRouterImpl) PlayerAttributes(c *gin.Context) {
 | 
				
			||||||
	c.JSON(http.StatusOK, gin.H{
 | 
						c.JSON(http.StatusOK, gin.H{
 | 
				
			||||||
		"privileges": gin.H{
 | 
							"privileges": gin.H{
 | 
				
			||||||
			"onlineChat":        true,
 | 
								"onlineChat": gin.H{
 | 
				
			||||||
			"multiplayerServer": true,
 | 
									"enabled": true,
 | 
				
			||||||
			"multiplayerRealms": false,
 | 
								},
 | 
				
			||||||
			"telemetry":         false,
 | 
								"multiplayerServer": gin.H{
 | 
				
			||||||
			"optionalTelemetry": false,
 | 
									"enabled": true,
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								"multiplayerRealms": gin.H{
 | 
				
			||||||
 | 
									"enabled": false,
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								"telemetry": gin.H{
 | 
				
			||||||
 | 
									"enabled": false,
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
								"optionalTelemetry": gin.H{
 | 
				
			||||||
 | 
									"enabled": false,
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
		},
 | 
							},
 | 
				
			||||||
		"profanityFilterPreferences": gin.H{
 | 
							"profanityFilterPreferences": gin.H{
 | 
				
			||||||
			"profanityFilterOn": false,
 | 
								"profanityFilterOn": false,
 | 
				
			||||||
@@ -315,6 +326,12 @@ func (u *userRouterImpl) PlayerAttributes(c *gin.Context) {
 | 
				
			|||||||
	})
 | 
						})
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					func (u *userRouterImpl) PlayerBlockList(c *gin.Context) {
 | 
				
			||||||
 | 
						c.JSON(http.StatusOK, gin.H{
 | 
				
			||||||
 | 
							"blockedProfiles": []string{},
 | 
				
			||||||
 | 
						})
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
func (u *userRouterImpl) ProfileKey(c *gin.Context) {
 | 
					func (u *userRouterImpl) ProfileKey(c *gin.Context) {
 | 
				
			||||||
	bearerToken := c.GetHeader("Authorization")
 | 
						bearerToken := c.GetHeader("Authorization")
 | 
				
			||||||
	if len(bearerToken) < 8 {
 | 
						if len(bearerToken) < 8 {
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user