Commit 59e22a37 authored by nanahira's avatar nanahira

use sapi

parent be640af5
Pipeline #4491 passed with stages
in 4 minutes and 16 seconds
......@@ -16,5 +16,5 @@ deploy:
endpoint: https://minio.mycard.moe:9000
notifications:
webhooks:
urls: https://api.mycard.moe/notify/travis
urls: https://sapi.moecube.com:444/notify/travis
on_cancel: never
......@@ -21,10 +21,10 @@
{
"name": "api-freshness",
"urls": [
"https://api.mycard.moe/apps.json",
"https://sapi.moecube.com:444/apps.json",
"https://ygobbs.com/top/quarterly.json",
"https://mycard.moe/ygopro/api/history",
"https://api.mycard.moe/ygopro/arena/user"
"https://sapi.moecube.com:444/ygopro/arena/user"
],
"cacheConfig": {
"maxSize": 100,
......
......@@ -28,7 +28,7 @@ export class LobbyComponent {
suggestion = this.searchControl.valueChanges.pipe(
distinctUntilChanged(),
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))
);
......@@ -43,7 +43,7 @@ export class LobbyComponent {
public storage: StorageService,
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);
this.arena_url = arena_url.toString();
......
......@@ -17,7 +17,7 @@ const offset = new Date().getTimezoneOffset() * 60 * second;
})
export class MatchDialogComponent implements OnInit, OnDestroy {
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));
actual_wait = timer(0, second).pipe(map(timestamp => timestamp * second + offset));
......@@ -32,7 +32,7 @@ export class MatchDialogComponent implements OnInit, OnDestroy {
ngOnInit() {
this.matching = this.http
.post<MatchResponse>('https://api.mycard.moe/ygopro/match', null, {
.post<MatchResponse>('https://sapi.moecube.com:444/ygopro/match', null, {
headers: {
Authorization: 'Basic ' + Buffer.from(this.login.user.username + ':' + this.login.user.external_id).toString('base64')
},
......
......@@ -27,7 +27,7 @@ type Stats = DirectoryStats | FileStats;
export class StorageService {
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);
constructor(private login: LoginService) {}
......
......@@ -141,7 +141,7 @@ export class YGOProService {
{
id: 'tiramisu-athletic',
url: 'wss://tiramisu.mycard.moe:8923',
address: 'tiramisu.mycard.moe',
address: 'tiramisu.sapi.moecube.com:444',
port: 8911,
custom: false,
replay: true
......@@ -149,7 +149,7 @@ export class YGOProService {
];
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
.pipe(
map(_app =>
......@@ -190,7 +190,7 @@ export class YGOProService {
refresh
.pipe(
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);
......@@ -198,7 +198,7 @@ export class YGOProService {
refresh
.pipe(
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' }
})
),
......
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