mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2026-02-06 02:06:29 +01:00
Change to api.grasscutter.io
This commit is contained in:
@@ -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) => {
|
||||||
|
|||||||
@@ -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="
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -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()
|
||||||
|
|
||||||
|
|||||||
@@ -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 {
|
||||||
|
|||||||
Reference in New Issue
Block a user