mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-11-04 17:35:15 +00:00
Log in as user support
This commit is contained in:
@@ -37,6 +37,7 @@ export * from "./getToken";
|
||||
export * from "./getUser";
|
||||
export * from "./getUsers";
|
||||
export * from "./helpers";
|
||||
export * from "./loginAsUser";
|
||||
export * from "./models";
|
||||
export * from "./refreshToken";
|
||||
export * from "./renewCertificate";
|
||||
|
||||
8
frontend/src/api/backend/loginAsUser.ts
Normal file
8
frontend/src/api/backend/loginAsUser.ts
Normal file
@@ -0,0 +1,8 @@
|
||||
import * as api from "./base";
|
||||
import type { LoginAsTokenResponse } from "./responseTypes";
|
||||
|
||||
export async function loginAsUser(id: number): Promise<LoginAsTokenResponse> {
|
||||
return await api.post({
|
||||
url: `/users/${id}/login`,
|
||||
});
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { AppVersion } from "./models";
|
||||
import type { AppVersion, User } from "./models";
|
||||
|
||||
export interface HealthResponse {
|
||||
status: string;
|
||||
@@ -15,3 +15,7 @@ export interface ValidatedCertificateResponse {
|
||||
certificate: Record<string, any>;
|
||||
certificateKey: boolean;
|
||||
}
|
||||
|
||||
export interface LoginAsTokenResponse extends TokenResponse {
|
||||
user: User;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user