mirror of
https://github.com/Jellify-Music/App.git
synced 2026-02-24 21:00:00 -06:00
fix build
This commit is contained in:
15
api/server.ts
Normal file
15
api/server.ts
Normal file
@@ -0,0 +1,15 @@
|
||||
import { getSystemApi } from "@jellyfin/sdk/lib/utils/api/system-api";
|
||||
import { buildApiClient } from "./client";
|
||||
|
||||
export const serverMutation = async (serverUrl: string) => {
|
||||
|
||||
console.log("Mutating server URL");
|
||||
|
||||
if (!!!serverUrl)
|
||||
throw Error("Server URL is empty")
|
||||
|
||||
const api = buildApiClient(serverUrl);
|
||||
|
||||
console.log(`Created API client for ${api.basePath}`)
|
||||
return await getSystemApi(api).getPublicSystemInfo();
|
||||
}
|
||||
@@ -3,16 +3,15 @@ import _ from "lodash";
|
||||
import { useMutation } from "@tanstack/react-query";
|
||||
import { MMKVStorageKeys } from "../../../enums/mmkv-storage-keys";
|
||||
import { JellifyServer } from "../../../types/JellifyServer";
|
||||
import { mutateServer, serverMutation } from "../../../api/mutators/functions/storage";
|
||||
import { useApiClientContext } from "../../jellyfin-api-provider";
|
||||
import { View, XStack } from "tamagui";
|
||||
import { SwitchWithLabel } from "../../helpers/switch-with-label";
|
||||
import { useAuthenticationContext } from "../provider";
|
||||
import { Heading } from "../../helpers/text";
|
||||
import Input from "../../helpers/input";
|
||||
import Button from "../../helpers/button";
|
||||
import { http, https } from "../utils/constants";
|
||||
import { storage } from "../../../constants/storage";
|
||||
import { serverMutation } from "../../../api/server";
|
||||
|
||||
export default function ServerAddress(): React.JSX.Element {
|
||||
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
import { useMutation, useQuery } from "@tanstack/react-query";
|
||||
import { useQuery } from "@tanstack/react-query";
|
||||
import React, { useEffect, useState } from "react";
|
||||
import { useApiClientContext } from "../../jellyfin-api-provider";
|
||||
import { Select, View } from "tamagui";
|
||||
import { JellifyLibrary } from "../../../types/JellifyLibrary";
|
||||
import { mutateServerCredentials } from "../../../api/mutators/functions/storage";
|
||||
import { useAuthenticationContext } from "../provider";
|
||||
import { Heading } from "../../helpers/text";
|
||||
import Button from "../../helpers/button";
|
||||
|
||||
Reference in New Issue
Block a user