aboutsummaryrefslogtreecommitdiff
path: root/build/cleaners/skyblock/profiles.js
blob: b79fc56489401a87456ab147a560f4c066990954 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.cleanSkyblockProfilesResponse = exports.cleanPlayerSkyblockProfiles = void 0;
const profile_1 = require("./profile");
function cleanPlayerSkyblockProfiles(rawProfiles) {
    let profiles = [];
    for (const profile of Object.values(rawProfiles)) {
        profiles.push({
            uuid: profile.profile_id,
            name: profile.cute_name
        });
    }
    console.log('cleanPlayerSkyblockProfiles', profiles);
    return profiles;
}
exports.cleanPlayerSkyblockProfiles = cleanPlayerSkyblockProfiles;
/** Convert an array of raw profiles into clean profiles */
async function cleanSkyblockProfilesResponse(data) {
    const cleanedProfiles = [];
    for (const profile of data) {
        let cleanedProfile = await profile_1.cleanSkyblockProfileResponseLighter(profile);
        cleanedProfiles.push(cleanedProfile);
    }
    return cleanedProfiles;
}
exports.cleanSkyblockProfilesResponse = cleanSkyblockProfilesResponse;