mirror of
https://github.com/aykhans/slash-e.git
synced 2025-07-07 13:42:34 +00:00
chore: rename status to profile
This commit is contained in:
@ -1,12 +1,12 @@
|
||||
import { Checkbox } from "@mui/joy";
|
||||
import { useEffect, useState } from "react";
|
||||
import { getSystemStatus, upsertWorkspaceSetting } from "../../helpers/api";
|
||||
import { getWorkspaceProfile, upsertWorkspaceSetting } from "../../helpers/api";
|
||||
|
||||
const WorkspaceSection: React.FC = () => {
|
||||
const [disallowSignUp, setDisallowSignUp] = useState<boolean>(false);
|
||||
|
||||
useEffect(() => {
|
||||
getSystemStatus().then(({ data }) => {
|
||||
getWorkspaceProfile().then(({ data }) => {
|
||||
setDisallowSignUp(data.disallowSignUp);
|
||||
});
|
||||
}, []);
|
||||
|
@ -1,7 +1,7 @@
|
||||
import axios from "axios";
|
||||
|
||||
export function getSystemStatus() {
|
||||
return axios.get<SystemStatus>("/api/v1/workspace/status");
|
||||
export function getWorkspaceProfile() {
|
||||
return axios.get<WorkspaceProfile>("/api/v1/workspace/profile");
|
||||
}
|
||||
|
||||
export function signin(email: string, password: string) {
|
||||
|
2
web/src/types/modules/system.d.ts
vendored
2
web/src/types/modules/system.d.ts
vendored
@ -3,7 +3,7 @@ interface Profile {
|
||||
version: string;
|
||||
}
|
||||
|
||||
interface SystemStatus {
|
||||
interface WorkspaceProfile {
|
||||
profile: Profile;
|
||||
disallowSignUp: boolean;
|
||||
}
|
||||
|
Reference in New Issue
Block a user