Add /minecraft/profile/lookup/name/:playerName route

This commit is contained in:
Evan Goode 2025-04-01 16:30:13 -04:00
parent 07f75ab62c
commit ba2292d1b0
2 changed files with 4 additions and 0 deletions

View File

@ -19,6 +19,7 @@ type playerNameToUUIDResponse struct {
}
// GET /users/profiles/minecraft/:playerName
// GET /minecraft/profile/lookup/name/:playerName
// https://minecraft.wiki/w/Mojang_API#Query_player's_UUID
func AccountPlayerNameToID(app *App) func(c echo.Context) error {
return func(c echo.Context) error {

View File

@ -367,6 +367,7 @@ func (app *App) MakeServer() *echo.Echo {
e.POST("/minecraft/profile/skins", servicesUploadSkin)
e.PUT("/minecraft/profile/name/:playerName", servicesChangeName)
e.GET("/publickeys", servicesPublicKeys)
e.GET("/minecraft/profile/lookup/name/:playerName", accountPlayerNameToID)
e.POST("/minecraft/profile/lookup/bulk/byname", accountPlayerNamesToIDs)
e.GET("/services/privileges", servicesPlayerAttributes)
@ -382,6 +383,7 @@ func (app *App) MakeServer() *echo.Echo {
e.POST("/services/minecraft/profile/skins", servicesUploadSkin)
e.PUT("/services/minecraft/profile/name/:playerName", servicesChangeName)
e.GET("/services/publickeys", servicesPublicKeys)
e.GET("/services/minecraft/profile/lookup/name/:playerName", accountPlayerNameToID)
e.POST("/services/minecraft/profile/lookup/bulk/byname", accountPlayerNamesToIDs)
e.GET("/authlib-injector/minecraftservices/privileges", servicesPlayerAttributes)
@ -397,6 +399,7 @@ func (app *App) MakeServer() *echo.Echo {
e.POST("/authlib-injector/minecraftservices/minecraft/profile/skins", servicesUploadSkin)
e.PUT("/authlib-injector/minecraftservices/minecraft/profile/name/:playerName", servicesChangeName)
e.GET("/authlib-injector/minecraftservices/publickeys", servicesPublicKeys)
e.GET("/authlib-injector/minecraftservices/minecraft/profile/lookup/name/:playerName", accountPlayerNameToID)
e.POST("/authlib-injector/minecraftservices/minecraft/profile/lookup/bulk/byname", accountPlayerNamesToIDs)
return e