Added metadata
This commit is contained in:
@@ -18,5 +18,6 @@ export async function getUuid(ign: string) {
|
||||
|
||||
if (!parsed.success) return null
|
||||
|
||||
return parsed.data.id
|
||||
}
|
||||
return parsed.data
|
||||
}
|
||||
|
||||
|
||||
@@ -2,16 +2,16 @@ import { getUuid } from "./api/mojang"
|
||||
import { getPlayer } from "./api/player"
|
||||
|
||||
export async function _validatePlayer(ign: string) {
|
||||
const uuid = await getUuid(ign)
|
||||
const mc = await getUuid(ign)
|
||||
|
||||
if (!uuid) {
|
||||
if (!mc) {
|
||||
return {
|
||||
error: true,
|
||||
message: "Player not found"
|
||||
}
|
||||
}
|
||||
|
||||
const player = await getPlayer(uuid)
|
||||
const player = await getPlayer(mc.id)
|
||||
|
||||
if (!player) {
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user