filestash/public/assets/model/backend.js
2024-06-21 21:05:44 +10:00

14 lines
286 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$;
}