Something went wrong. Try again.
A rhythm game leaderboard server that can't EOS. tsunagite.dev
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829collection = "dev.tsunagite.game"
function handle() if params.player then local resp = http.get("https://slingshot.microcosm.blue/xrpc/blue.microcosm.identity.resolveMiniDoc?identifier=" .. params.player) local did = json.decode(resp.body).did local profiles = db.query({ collection = "dev.tsunagite.profile", did = did, limit = params.limit, cursor = params.cursor }) local games = {} for _, v in profiles.records do table.insert(games, db.get(v.game)) end return {["games"] = games, ["cursor"] = profiles.cursor} end
local results = db.query({ collection = collection, limit = params.limit, cursor = params.cursor, }) results.games = results.records results.records = nil return resultsend