Same with profiles
This commit is contained in:
@@ -70,16 +70,7 @@ export async function handler (context: Context) {
|
|||||||
connection0.end()
|
connection0.end()
|
||||||
connection1.end()
|
connection1.end()
|
||||||
|
|
||||||
let custom = null
|
const customIcon = savedata.bird?.customIcon?.selected ?? null
|
||||||
if (savedata?.bird?.customIcon?.selected) {
|
|
||||||
const selected = savedata?.bird?.customIcon?.selected
|
|
||||||
for (const entry of savedata?.bird?.customIcon?.data ?? []) {
|
|
||||||
if (entry.uuid && entry.uuid == selected) {
|
|
||||||
custom = entry.data
|
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return jsonResponse({
|
return jsonResponse({
|
||||||
success: true,
|
success: true,
|
||||||
@@ -87,15 +78,15 @@ export async function handler (context: Context) {
|
|||||||
data: {
|
data: {
|
||||||
username: user[0].username,
|
username: user[0].username,
|
||||||
memberFor: genTimestamp(user[0].registerTime, 2),
|
memberFor: genTimestamp(user[0].registerTime, 2),
|
||||||
icon: custom ? null : savedata?.icon ?? 1,
|
icon: customIcon ? null : savedata?.icon ?? 1,
|
||||||
overlay: custom ? null : savedata?.overlay ?? 0,
|
overlay: customIcon ? null : savedata?.overlay ?? 0,
|
||||||
iconColor: custom
|
iconColor: customIcon
|
||||||
? null
|
? null
|
||||||
: savedata?.settings?.colors?.icon ?? [255, 255, 255],
|
: savedata?.settings?.colors?.icon ?? [255, 255, 255],
|
||||||
overlayColor: custom
|
overlayColor: customIcon
|
||||||
? null
|
? null
|
||||||
: savedata?.settings?.colors?.overlay ?? [255, 255, 255],
|
: savedata?.settings?.colors?.overlay ?? [255, 255, 255],
|
||||||
customIcon: custom,
|
customIcon: customIcon,
|
||||||
stats: {
|
stats: {
|
||||||
totalNormalBerries: parseInt(
|
totalNormalBerries: parseInt(
|
||||||
savedata?.gameStore?.totalNormalBerries ?? 0
|
savedata?.gameStore?.totalNormalBerries ?? 0
|
||||||
|
|||||||
Reference in New Issue
Block a user