refactor: Splitting API requests from app.js (#1166)

* splitting API requests form app.js

* fix: vip friends display issue
This commit is contained in:
pa
2025-03-03 07:42:29 +09:00
committed by GitHub
parent f1fb44840e
commit 41c47d3dc2
21 changed files with 1881 additions and 1623 deletions
+12 -8
View File
@@ -1,5 +1,6 @@
import configRepository from '../repository/config.js';
import { baseClass, $app, API, $t, $utils } from './baseClass.js';
import { worldRequest } from './request';
export default class extends baseClass {
constructor(_app, _API, _t) {
@@ -48,14 +49,17 @@ export default class extends baseClass {
L.thumbnailImageUrl = ref.thumbnailImageUrl;
L.worldCapacity = ref.capacity;
} else {
API.getWorld({
worldId: L.worldId
}).then((args) => {
L.worldName = args.ref.name;
L.thumbnailImageUrl = args.ref.thumbnailImageUrl;
L.worldCapacity = args.ref.capacity;
return args;
});
worldRequest
.getWorld({
worldId: L.worldId
})
.then((args) => {
L.worldName = args.ref.name;
L.thumbnailImageUrl =
args.ref.thumbnailImageUrl;
L.worldCapacity = args.ref.capacity;
return args;
});
}
if (this.isGameNoVR) {
var platform = 'Desktop';