mirror of
https://github.com/mickael-kerjean/filestash.git
synced 2025-11-02 03:54:59 +08:00
16 lines
338 B
JavaScript
16 lines
338 B
JavaScript
import rxjs from "../../lib/rx.js";
|
|
import ajax from "../../lib/ajax.js";
|
|
|
|
const model$ = ajax({
|
|
url: "/admin/api/middlewares/authentication",
|
|
method: "GET",
|
|
responseType: "json"
|
|
}).pipe(
|
|
rxjs.map(({ responseJSON }) => responseJSON.result),
|
|
rxjs.share(),
|
|
);
|
|
|
|
export function getAuthMiddleware() {
|
|
return model$;
|
|
}
|