Commit 59e22a37 authored by nanahira's avatar nanahira

use sapi

parent be640af5
...@@ -16,5 +16,5 @@ deploy: ...@@ -16,5 +16,5 @@ deploy:
endpoint: https://minio.mycard.moe:9000 endpoint: https://minio.mycard.moe:9000
notifications: notifications:
webhooks: webhooks:
urls: https://api.mycard.moe/notify/travis urls: https://sapi.moecube.com:444/notify/travis
on_cancel: never on_cancel: never
...@@ -21,10 +21,10 @@ ...@@ -21,10 +21,10 @@
{ {
"name": "api-freshness", "name": "api-freshness",
"urls": [ "urls": [
"https://api.mycard.moe/apps.json", "https://sapi.moecube.com:444/apps.json",
"https://ygobbs.com/top/quarterly.json", "https://ygobbs.com/top/quarterly.json",
"https://mycard.moe/ygopro/api/history", "https://mycard.moe/ygopro/api/history",
"https://api.mycard.moe/ygopro/arena/user" "https://sapi.moecube.com:444/ygopro/arena/user"
], ],
"cacheConfig": { "cacheConfig": {
"maxSize": 100, "maxSize": 100,
......
...@@ -28,7 +28,7 @@ export class LobbyComponent { ...@@ -28,7 +28,7 @@ export class LobbyComponent {
suggestion = this.searchControl.valueChanges.pipe( suggestion = this.searchControl.valueChanges.pipe(
distinctUntilChanged(), distinctUntilChanged(),
filter(name => name), filter(name => name),
switchMap(name => this.http.get<{ value: string }[]>(`https://api.mycard.moe/ygopro/suggest/${name}`)), switchMap(name => this.http.get<{ value: string }[]>(`https://sapi.moecube.com:444/ygopro/suggest/${name}`)),
map(data => data.map(item => item.value)) map(data => data.map(item => item.value))
); );
...@@ -43,7 +43,7 @@ export class LobbyComponent { ...@@ -43,7 +43,7 @@ export class LobbyComponent {
public storage: StorageService, public storage: StorageService,
private dialog: MatDialog private dialog: MatDialog
) { ) {
const arena_url = new URL('https://mycard.moe/ygopro/arena'); const arena_url = new URL('https://sapi.moecube.com:444/ygopro/arena');
arena_url.searchParams.set('sso', login.token); arena_url.searchParams.set('sso', login.token);
this.arena_url = arena_url.toString(); this.arena_url = arena_url.toString();
......
...@@ -17,7 +17,7 @@ const offset = new Date().getTimezoneOffset() * 60 * second; ...@@ -17,7 +17,7 @@ const offset = new Date().getTimezoneOffset() * 60 * second;
}) })
export class MatchDialogComponent implements OnInit, OnDestroy { export class MatchDialogComponent implements OnInit, OnDestroy {
expect_wait = this.http expect_wait = this.http
.get('https://api.mycard.moe/ygopro/match/stats/' + this.arena) .get('https://sapi.moecube.com:444/ygopro/match/stats/' + this.arena)
.pipe(map((data: number) => data * second + offset)); .pipe(map((data: number) => data * second + offset));
actual_wait = timer(0, second).pipe(map(timestamp => timestamp * second + offset)); actual_wait = timer(0, second).pipe(map(timestamp => timestamp * second + offset));
...@@ -32,7 +32,7 @@ export class MatchDialogComponent implements OnInit, OnDestroy { ...@@ -32,7 +32,7 @@ export class MatchDialogComponent implements OnInit, OnDestroy {
ngOnInit() { ngOnInit() {
this.matching = this.http this.matching = this.http
.post<MatchResponse>('https://api.mycard.moe/ygopro/match', null, { .post<MatchResponse>('https://sapi.moecube.com:444/ygopro/match', null, {
headers: { headers: {
Authorization: 'Basic ' + Buffer.from(this.login.user.username + ':' + this.login.user.external_id).toString('base64') Authorization: 'Basic ' + Buffer.from(this.login.user.username + ':' + this.login.user.external_id).toString('base64')
}, },
......
...@@ -27,7 +27,7 @@ type Stats = DirectoryStats | FileStats; ...@@ -27,7 +27,7 @@ type Stats = DirectoryStats | FileStats;
export class StorageService { export class StorageService {
app_id = 'ygopro'; app_id = 'ygopro';
client = webdav('https://api.mycard.moe/storage/', this.login.user.username, this.login.user.external_id.toString()); client = webdav('https://sapi.moecube.com:444/storage/', this.login.user.username, this.login.user.external_id.toString());
working = new BehaviorSubject(false); working = new BehaviorSubject(false);
constructor(private login: LoginService) {} constructor(private login: LoginService) {}
......
...@@ -141,7 +141,7 @@ export class YGOProService { ...@@ -141,7 +141,7 @@ export class YGOProService {
{ {
id: 'tiramisu-athletic', id: 'tiramisu-athletic',
url: 'wss://tiramisu.mycard.moe:8923', url: 'wss://tiramisu.mycard.moe:8923',
address: 'tiramisu.mycard.moe', address: 'tiramisu.sapi.moecube.com:444',
port: 8911, port: 8911,
custom: false, custom: false,
replay: true replay: true
...@@ -149,7 +149,7 @@ export class YGOProService { ...@@ -149,7 +149,7 @@ export class YGOProService {
]; ];
constructor(private login: LoginService, private http: HttpClient, private dialog: MatDialog, private storage: StorageService) { constructor(private login: LoginService, private http: HttpClient, private dialog: MatDialog, private storage: StorageService) {
const app = this.http.get<App[]>('https://api.mycard.moe/apps.json').pipe(map(apps => apps.find(_app => _app.id === 'ygopro')!), publishLast(), refCount()); const app = this.http.get<App[]>('https://sapi.moecube.com:444/apps.json').pipe(map(apps => apps.find(_app => _app.id === 'ygopro')!), publishLast(), refCount());
this.news = app this.news = app
.pipe( .pipe(
map(_app => map(_app =>
...@@ -190,7 +190,7 @@ export class YGOProService { ...@@ -190,7 +190,7 @@ export class YGOProService {
refresh refresh
.pipe( .pipe(
mergeMap(() => mergeMap(() =>
this.http.get<Points>('https://api.mycard.moe/ygopro/arena/user', { params: { username: this.login.user.username } }) this.http.get<Points>('https://sapi.moecube.com:444/ygopro/arena/user', { params: { username: this.login.user.username } })
) )
) )
.subscribe(this.points); .subscribe(this.points);
...@@ -198,7 +198,7 @@ export class YGOProService { ...@@ -198,7 +198,7 @@ export class YGOProService {
refresh refresh
.pipe( .pipe(
mergeMap(() => mergeMap(() =>
this.http.get<{ data: any[] }>('https://api.mycard.moe/ygopro/arena/history', { this.http.get<{ data: any[] }>('https://sapi.moecube.com:444/ygopro/arena/history', {
params: { username: this.login.user.username, type: '0', page_num: '1' } params: { username: this.login.user.username, type: '0', page_num: '1' }
}) })
), ),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment