对应官方 api.minecraftservices.com/minecraft/profile/lookup/name/{name},
1.21.7 的 /whitelist add 等命令会请求该接口(authlib-injector issue #277)。
authlib-injector 把 api.minecraftservices.com override 到 {apiRoot}/minecraftservices,
故路由注册在 mcServices 组下:
GET /api/yggdrasil/minecraftservices/minecraft/profile/lookup/name/:name
复用 ProfileSearchByNameSingle,返回 {id,name},未找到返回 404。
go build ./... && go test ./... 全部通过。
8.0 KiB
8.0 KiB