mirror of
https://github.com/mickael-kerjean/filestash.git
synced 2025-11-02 11:57:04 +08:00
15 lines
287 B
JavaScript
15 lines
287 B
JavaScript
import rxjs from "../lib/rx.js";
|
|
import ajax from "../lib/ajax.js";
|
|
|
|
const backend$ = ajax({
|
|
url: "/api/backend",
|
|
method: "GET",
|
|
responseType: "json"
|
|
}).pipe(
|
|
rxjs.map(({ responseJSON }) => responseJSON.result),
|
|
);
|
|
|
|
export function getBackends() {
|
|
return backend$;
|
|
}
|