Change to api.grasscutter.io

This commit is contained in:
KingRainbow44
2022-07-01 16:25:18 -04:00
parent 3b99b9137a
commit b034c73c72
4 changed files with 6 additions and 4 deletions

View File

@@ -186,9 +186,10 @@ async fn get_theme_list(data_dir: String) -> Vec<HashMap<String, String>> {
} }
#[tauri::command] #[tauri::command]
// TODO: Replace with downloading the background file & saving it.
async fn get_bg_file(bg_path: String, appdata: String) -> String { async fn get_bg_file(bg_path: String, appdata: String) -> String {
let copy_loc = appdata; let copy_loc = appdata;
let query = web::query("https://api.grasscutters.xyz/cultivation/query").await; let query = web::query("https://api.grasscutter.io/cultivation/query").await;
let response_data: APIQuery = match serde_json::from_str(&query) { let response_data: APIQuery = match serde_json::from_str(&query) {
Ok(data) => data, Ok(data) => data,
Err(e) => { Err(e) => {

View File

@@ -75,7 +75,8 @@
"active": true, "active": true,
"dialog": true, "dialog": true,
"endpoints": [ "endpoints": [
"https://api.grasscutters.xyz/cultivation/update?version={{current_version}}" "https://api.grasscutter.io/cultivation/updater?version={{current_version}}",
"https://api.grasscutters.xyz/cultivation/updater?version={{current_version}}"
], ],
"pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IEIyM0MzMzk0NkM4OTQzNQpSV1ExbE1oR09jTWpDNFJ4NURsaS9mdHpDWmpBM3JNVHkrdER4bS9KdHFCQnNVSWs0ZjZTU295WAo=" "pubkey": "dW50cnVzdGVkIGNvbW1lbnQ6IG1pbmlzaWduIHB1YmxpYyBrZXk6IEIyM0MzMzk0NkM4OTQzNQpSV1ExbE1oR09jTWpDNFJ4NURsaS9mdHpDWmpBM3JNVHkrdER4bS9KdHFCQnNVSWs0ZjZTU295WAo="
}, },

View File

@@ -36,7 +36,7 @@ interface IState {
bgFile: string; bgFile: string;
} }
const DEFAULT_BG = 'https://api.grasscutters.xyz/content/bgfile' const DEFAULT_BG = 'https://api.grasscutter.io/cultivation/bgfile'
const downloadHandler = new DownloadHandler() const downloadHandler = new DownloadHandler()

View File

@@ -42,7 +42,7 @@ export default class NewsSection extends React.Component<IProps, IState> {
async showLatestCommits() { async showLatestCommits() {
if (!this.state.commitList) { if (!this.state.commitList) {
const commits: string = await invoke('req_get', { url: 'https://api.grasscutters.xyz/cultivation/query' }) const commits: string = await invoke('req_get', { url: 'https://api.grasscutter.io/cultivation/query' })
let obj let obj
try { try {