Commit 21ef5a9b authored by Steven's avatar Steven

chore: tweak workspace service

parent 87b23940
...@@ -3,16 +3,15 @@ package v2 ...@@ -3,16 +3,15 @@ package v2
import "strings" import "strings"
var authenticationAllowlistMethods = map[string]bool{ var authenticationAllowlistMethods = map[string]bool{
"/memos.api.v2.SystemService/GetSystemInfo": true, "/memos.api.v2.WorkspaceService/GetWorkspaceProfile": true,
"/memos.api.v2.AuthService/GetAuthStatus": true, "/memos.api.v2.AuthService/GetAuthStatus": true,
"/memos.api.v2.UserService/GetUser": true, "/memos.api.v2.UserService/GetUser": true,
"/memos.api.v2.MemoService/ListMemos": true, "/memos.api.v2.MemoService/ListMemos": true,
"/memos.api.v2.MemoService/GetMemo": true, "/memos.api.v2.MemoService/GetMemo": true,
"/memos.api.v2.MemoService/GetMemoByName": true, "/memos.api.v2.MemoService/GetMemoByName": true,
"/memos.api.v2.MemoService/ListMemoResources": true, "/memos.api.v2.MemoService/ListMemoResources": true,
"/memos.api.v2.MemoService/ListMemoRelations": true, "/memos.api.v2.MemoService/ListMemoRelations": true,
"/memos.api.v2.MemoService/ListMemoComments": true, "/memos.api.v2.MemoService/ListMemoComments": true,
"/memos.api.v2.MarkdownService/ParseMarkdown": true,
} }
// isUnauthorizeAllowedMethod returns whether the method is exempted from authentication. // isUnauthorizeAllowedMethod returns whether the method is exempted from authentication.
......
...@@ -21,7 +21,7 @@ import ( ...@@ -21,7 +21,7 @@ import (
) )
type APIV2Service struct { type APIV2Service struct {
apiv2pb.UnimplementedSystemServiceServer apiv2pb.UnimplementedWorkspaceServiceServer
apiv2pb.UnimplementedAuthServiceServer apiv2pb.UnimplementedAuthServiceServer
apiv2pb.UnimplementedUserServiceServer apiv2pb.UnimplementedUserServiceServer
apiv2pb.UnimplementedMemoServiceServer apiv2pb.UnimplementedMemoServiceServer
...@@ -56,7 +56,7 @@ func NewAPIV2Service(secret string, profile *profile.Profile, store *store.Store ...@@ -56,7 +56,7 @@ func NewAPIV2Service(secret string, profile *profile.Profile, store *store.Store
grpcServerPort: grpcServerPort, grpcServerPort: grpcServerPort,
} }
apiv2pb.RegisterSystemServiceServer(grpcServer, apiv2Service) apiv2pb.RegisterWorkspaceServiceServer(grpcServer, apiv2Service)
apiv2pb.RegisterAuthServiceServer(grpcServer, apiv2Service) apiv2pb.RegisterAuthServiceServer(grpcServer, apiv2Service)
apiv2pb.RegisterUserServiceServer(grpcServer, apiv2Service) apiv2pb.RegisterUserServiceServer(grpcServer, apiv2Service)
apiv2pb.RegisterMemoServiceServer(grpcServer, apiv2Service) apiv2pb.RegisterMemoServiceServer(grpcServer, apiv2Service)
...@@ -89,7 +89,7 @@ func (s *APIV2Service) RegisterGateway(ctx context.Context, e *echo.Echo) error ...@@ -89,7 +89,7 @@ func (s *APIV2Service) RegisterGateway(ctx context.Context, e *echo.Echo) error
} }
gwMux := runtime.NewServeMux() gwMux := runtime.NewServeMux()
if err := apiv2pb.RegisterSystemServiceHandler(context.Background(), gwMux, conn); err != nil { if err := apiv2pb.RegisterWorkspaceServiceHandler(context.Background(), gwMux, conn); err != nil {
return err return err
} }
if err := apiv2pb.RegisterAuthServiceHandler(context.Background(), gwMux, conn); err != nil { if err := apiv2pb.RegisterAuthServiceHandler(context.Background(), gwMux, conn); err != nil {
......
...@@ -10,9 +10,9 @@ tags: ...@@ -10,9 +10,9 @@ tags:
- name: MarkdownService - name: MarkdownService
- name: ResourceService - name: ResourceService
- name: MemoService - name: MemoService
- name: SystemService
- name: TagService - name: TagService
- name: WebhookService - name: WebhookService
- name: WorkspaceService
consumes: consumes:
- application/json - application/json
produces: produces:
...@@ -546,40 +546,6 @@ paths: ...@@ -546,40 +546,6 @@ paths:
format: int32 format: int32
tags: tags:
- ResourceService - ResourceService
/api/v2/system/info:
get:
operationId: SystemService_GetSystemInfo
responses:
"200":
description: A successful response.
schema:
$ref: '#/definitions/v2GetSystemInfoResponse'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
tags:
- SystemService
patch:
operationId: SystemService_UpdateSystemInfo
responses:
"200":
description: A successful response.
schema:
$ref: '#/definitions/v2UpdateSystemInfoResponse'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: systemInfo
description: System info is the updated data.
in: body
required: true
schema:
$ref: '#/definitions/v2SystemInfo'
tags:
- SystemService
/api/v2/tags: /api/v2/tags:
get: get:
operationId: TagService_ListTags operationId: TagService_ListTags
...@@ -815,6 +781,40 @@ paths: ...@@ -815,6 +781,40 @@ paths:
$ref: '#/definitions/WebhookServiceUpdateWebhookBody' $ref: '#/definitions/WebhookServiceUpdateWebhookBody'
tags: tags:
- WebhookService - WebhookService
/api/v2/workspace/profile:
get:
operationId: WorkspaceService_GetWorkspaceProfile
responses:
"200":
description: A successful response.
schema:
$ref: '#/definitions/v2GetWorkspaceProfileResponse'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
tags:
- WorkspaceService
patch:
operationId: WorkspaceService_UpdateWorkspaceProfile
responses:
"200":
description: A successful response.
schema:
$ref: '#/definitions/v2UpdateWorkspaceProfileResponse'
default:
description: An unexpected error response.
schema:
$ref: '#/definitions/googlerpcStatus'
parameters:
- name: workspaceProfile
description: System info is the updated data.
in: body
required: true
schema:
$ref: '#/definitions/v2WorkspaceProfile'
tags:
- WorkspaceService
/api/v2/{name}: /api/v2/{name}:
get: get:
summary: GetUser gets a user by name. summary: GetUser gets a user by name.
...@@ -1464,11 +1464,6 @@ definitions: ...@@ -1464,11 +1464,6 @@ definitions:
properties: properties:
resource: resource:
$ref: '#/definitions/v2Resource' $ref: '#/definitions/v2Resource'
v2GetSystemInfoResponse:
type: object
properties:
systemInfo:
$ref: '#/definitions/v2SystemInfo'
v2GetTagSuggestionsResponse: v2GetTagSuggestionsResponse:
type: object type: object
properties: properties:
...@@ -1502,6 +1497,11 @@ definitions: ...@@ -1502,6 +1497,11 @@ definitions:
properties: properties:
webhook: webhook:
$ref: '#/definitions/apiv2Webhook' $ref: '#/definitions/apiv2Webhook'
v2GetWorkspaceProfileResponse:
type: object
properties:
workspaceProfile:
$ref: '#/definitions/v2WorkspaceProfile'
v2HeadingNode: v2HeadingNode:
type: object type: object
properties: properties:
...@@ -1937,24 +1937,6 @@ definitions: ...@@ -1937,24 +1937,6 @@ definitions:
properties: properties:
content: content:
type: string type: string
v2SystemInfo:
type: object
properties:
version:
type: string
mode:
type: string
allowRegistration:
type: boolean
disablePasswordLogin:
type: boolean
additionalScript:
type: string
additionalStyle:
type: string
dbSize:
type: string
format: int64
v2TableNode: v2TableNode:
type: object type: object
properties: properties:
...@@ -2034,11 +2016,6 @@ definitions: ...@@ -2034,11 +2016,6 @@ definitions:
properties: properties:
resource: resource:
$ref: '#/definitions/v2Resource' $ref: '#/definitions/v2Resource'
v2UpdateSystemInfoResponse:
type: object
properties:
systemInfo:
$ref: '#/definitions/v2SystemInfo'
v2UpdateUserResponse: v2UpdateUserResponse:
type: object type: object
properties: properties:
...@@ -2054,6 +2031,11 @@ definitions: ...@@ -2054,6 +2031,11 @@ definitions:
properties: properties:
webhook: webhook:
$ref: '#/definitions/apiv2Webhook' $ref: '#/definitions/apiv2Webhook'
v2UpdateWorkspaceProfileResponse:
type: object
properties:
workspaceProfile:
$ref: '#/definitions/v2WorkspaceProfile'
v2UpsertTagResponse: v2UpsertTagResponse:
type: object type: object
properties: properties:
...@@ -2111,3 +2093,18 @@ definitions: ...@@ -2111,3 +2093,18 @@ definitions:
- PROTECTED - PROTECTED
- PUBLIC - PUBLIC
default: VISIBILITY_UNSPECIFIED default: VISIBILITY_UNSPECIFIED
v2WorkspaceProfile:
type: object
properties:
version:
type: string
mode:
type: string
allowRegistration:
type: boolean
disablePasswordLogin:
type: boolean
additionalScript:
type: string
additionalStyle:
type: string
...@@ -11,29 +11,18 @@ import ( ...@@ -11,29 +11,18 @@ import (
"github.com/usememos/memos/store" "github.com/usememos/memos/store"
) )
func (s *APIV2Service) GetSystemInfo(ctx context.Context, _ *apiv2pb.GetSystemInfoRequest) (*apiv2pb.GetSystemInfoResponse, error) { func (s *APIV2Service) GetWorkspaceProfile(ctx context.Context, _ *apiv2pb.GetWorkspaceProfileRequest) (*apiv2pb.GetWorkspaceProfileResponse, error) {
defaultSystemInfo := &apiv2pb.SystemInfo{} workspaceProfile := &apiv2pb.WorkspaceProfile{
Version: s.Profile.Version,
// Get the database size if the user is a host. Mode: s.Profile.Mode,
currentUser, err := getCurrentUser(ctx, s.Store)
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to get current user: %v", err)
} }
if currentUser != nil && currentUser.Role == store.RoleHost { response := &apiv2pb.GetWorkspaceProfileResponse{
size, err := s.Store.GetCurrentDBSize(ctx) WorkspaceProfile: workspaceProfile,
if err != nil {
return nil, status.Errorf(codes.Internal, "failed to get db size: %v", err)
}
defaultSystemInfo.DbSize = size
}
response := &apiv2pb.GetSystemInfoResponse{
SystemInfo: defaultSystemInfo,
} }
return response, nil return response, nil
} }
func (s *APIV2Service) UpdateSystemInfo(ctx context.Context, request *apiv2pb.UpdateSystemInfoRequest) (*apiv2pb.UpdateSystemInfoResponse, error) { func (s *APIV2Service) UpdateWorkspaceProfile(ctx context.Context, request *apiv2pb.UpdateWorkspaceProfileRequest) (*apiv2pb.UpdateWorkspaceProfileResponse, error) {
user, err := getCurrentUser(ctx, s.Store) user, err := getCurrentUser(ctx, s.Store)
if err != nil { if err != nil {
return nil, status.Errorf(codes.Internal, "failed to get current user: %v", err) return nil, status.Errorf(codes.Internal, "failed to get current user: %v", err)
...@@ -50,7 +39,7 @@ func (s *APIV2Service) UpdateSystemInfo(ctx context.Context, request *apiv2pb.Up ...@@ -50,7 +39,7 @@ func (s *APIV2Service) UpdateSystemInfo(ctx context.Context, request *apiv2pb.Up
if field == "allow_registration" { if field == "allow_registration" {
_, err := s.Store.UpsertSystemSetting(ctx, &store.SystemSetting{ _, err := s.Store.UpsertSystemSetting(ctx, &store.SystemSetting{
Name: "allow-signup", Name: "allow-signup",
Value: strconv.FormatBool(request.SystemInfo.AllowRegistration), Value: strconv.FormatBool(request.WorkspaceProfile.AllowRegistration),
}) })
if err != nil { if err != nil {
return nil, status.Errorf(codes.Internal, "failed to update allow_registration system setting: %v", err) return nil, status.Errorf(codes.Internal, "failed to update allow_registration system setting: %v", err)
...@@ -58,7 +47,7 @@ func (s *APIV2Service) UpdateSystemInfo(ctx context.Context, request *apiv2pb.Up ...@@ -58,7 +47,7 @@ func (s *APIV2Service) UpdateSystemInfo(ctx context.Context, request *apiv2pb.Up
} else if field == "disable_password_login" { } else if field == "disable_password_login" {
_, err := s.Store.UpsertSystemSetting(ctx, &store.SystemSetting{ _, err := s.Store.UpsertSystemSetting(ctx, &store.SystemSetting{
Name: "disable-password-login", Name: "disable-password-login",
Value: strconv.FormatBool(request.SystemInfo.DisablePasswordLogin), Value: strconv.FormatBool(request.WorkspaceProfile.DisablePasswordLogin),
}) })
if err != nil { if err != nil {
return nil, status.Errorf(codes.Internal, "failed to update disable_password_login system setting: %v", err) return nil, status.Errorf(codes.Internal, "failed to update disable_password_login system setting: %v", err)
...@@ -66,7 +55,7 @@ func (s *APIV2Service) UpdateSystemInfo(ctx context.Context, request *apiv2pb.Up ...@@ -66,7 +55,7 @@ func (s *APIV2Service) UpdateSystemInfo(ctx context.Context, request *apiv2pb.Up
} else if field == "additional_script" { } else if field == "additional_script" {
_, err := s.Store.UpsertSystemSetting(ctx, &store.SystemSetting{ _, err := s.Store.UpsertSystemSetting(ctx, &store.SystemSetting{
Name: "additional-script", Name: "additional-script",
Value: request.SystemInfo.AdditionalScript, Value: request.WorkspaceProfile.AdditionalScript,
}) })
if err != nil { if err != nil {
return nil, status.Errorf(codes.Internal, "failed to update additional_script system setting: %v", err) return nil, status.Errorf(codes.Internal, "failed to update additional_script system setting: %v", err)
...@@ -74,7 +63,7 @@ func (s *APIV2Service) UpdateSystemInfo(ctx context.Context, request *apiv2pb.Up ...@@ -74,7 +63,7 @@ func (s *APIV2Service) UpdateSystemInfo(ctx context.Context, request *apiv2pb.Up
} else if field == "additional_style" { } else if field == "additional_style" {
_, err := s.Store.UpsertSystemSetting(ctx, &store.SystemSetting{ _, err := s.Store.UpsertSystemSetting(ctx, &store.SystemSetting{
Name: "additional-style", Name: "additional-style",
Value: request.SystemInfo.AdditionalStyle, Value: request.WorkspaceProfile.AdditionalStyle,
}) })
if err != nil { if err != nil {
return nil, status.Errorf(codes.Internal, "failed to update additional_style system setting: %v", err) return nil, status.Errorf(codes.Internal, "failed to update additional_style system setting: %v", err)
...@@ -82,11 +71,11 @@ func (s *APIV2Service) UpdateSystemInfo(ctx context.Context, request *apiv2pb.Up ...@@ -82,11 +71,11 @@ func (s *APIV2Service) UpdateSystemInfo(ctx context.Context, request *apiv2pb.Up
} }
} }
systemInfo, err := s.GetSystemInfo(ctx, &apiv2pb.GetSystemInfoRequest{}) workspaceProfileMessage, err := s.GetWorkspaceProfile(ctx, &apiv2pb.GetWorkspaceProfileRequest{})
if err != nil { if err != nil {
return nil, status.Errorf(codes.Internal, "failed to get system info: %v", err) return nil, status.Errorf(codes.Internal, "failed to get system info: %v", err)
} }
return &apiv2pb.UpdateSystemInfoResponse{ return &apiv2pb.UpdateWorkspaceProfileResponse{
SystemInfo: systemInfo.SystemInfo, WorkspaceProfile: workspaceProfileMessage.WorkspaceProfile,
}, nil }, nil
} }
...@@ -8,41 +8,40 @@ import "google/protobuf/field_mask.proto"; ...@@ -8,41 +8,40 @@ import "google/protobuf/field_mask.proto";
option go_package = "gen/api/v2"; option go_package = "gen/api/v2";
service SystemService { service WorkspaceService {
rpc GetSystemInfo(GetSystemInfoRequest) returns (GetSystemInfoResponse) { rpc GetWorkspaceProfile(GetWorkspaceProfileRequest) returns (GetWorkspaceProfileResponse) {
option (google.api.http) = {get: "/api/v2/system/info"}; option (google.api.http) = {get: "/api/v2/workspace/profile"};
} }
rpc UpdateSystemInfo(UpdateSystemInfoRequest) returns (UpdateSystemInfoResponse) { rpc UpdateWorkspaceProfile(UpdateWorkspaceProfileRequest) returns (UpdateWorkspaceProfileResponse) {
option (google.api.http) = { option (google.api.http) = {
patch: "/api/v2/system/info", patch: "/api/v2/workspace/profile",
body: "system_info" body: "workspace_profile"
}; };
option (google.api.method_signature) = "system_info,update_mask"; option (google.api.method_signature) = "workspace_profile,update_mask";
} }
} }
message SystemInfo { message WorkspaceProfile {
string version = 1; string version = 1;
string mode = 2; string mode = 2;
bool allow_registration = 3; bool allow_registration = 3;
bool disable_password_login = 4; bool disable_password_login = 4;
string additional_script = 5; string additional_script = 5;
string additional_style = 6; string additional_style = 6;
int64 db_size = 7;
} }
message GetSystemInfoRequest {} message GetWorkspaceProfileRequest {}
message GetSystemInfoResponse { message GetWorkspaceProfileResponse {
SystemInfo system_info = 1; WorkspaceProfile workspace_profile = 1;
} }
message UpdateSystemInfoRequest { message UpdateWorkspaceProfileRequest {
// System info is the updated data. // System info is the updated data.
SystemInfo system_info = 1; WorkspaceProfile workspace_profile = 1;
google.protobuf.FieldMask update_mask = 2; google.protobuf.FieldMask update_mask = 2;
} }
message UpdateSystemInfoResponse { message UpdateWorkspaceProfileResponse {
SystemInfo system_info = 1; WorkspaceProfile workspace_profile = 1;
} }
...@@ -161,15 +161,6 @@ ...@@ -161,15 +161,6 @@
- [MemoService](#memos-api-v2-MemoService) - [MemoService](#memos-api-v2-MemoService)
- [api/v2/system_service.proto](#api_v2_system_service-proto)
- [GetSystemInfoRequest](#memos-api-v2-GetSystemInfoRequest)
- [GetSystemInfoResponse](#memos-api-v2-GetSystemInfoResponse)
- [SystemInfo](#memos-api-v2-SystemInfo)
- [UpdateSystemInfoRequest](#memos-api-v2-UpdateSystemInfoRequest)
- [UpdateSystemInfoResponse](#memos-api-v2-UpdateSystemInfoResponse)
- [SystemService](#memos-api-v2-SystemService)
- [api/v2/tag_service.proto](#api_v2_tag_service-proto) - [api/v2/tag_service.proto](#api_v2_tag_service-proto)
- [DeleteTagRequest](#memos-api-v2-DeleteTagRequest) - [DeleteTagRequest](#memos-api-v2-DeleteTagRequest)
- [DeleteTagResponse](#memos-api-v2-DeleteTagResponse) - [DeleteTagResponse](#memos-api-v2-DeleteTagResponse)
...@@ -200,6 +191,15 @@ ...@@ -200,6 +191,15 @@
- [WebhookService](#memos-api-v2-WebhookService) - [WebhookService](#memos-api-v2-WebhookService)
- [api/v2/workspace_service.proto](#api_v2_workspace_service-proto)
- [GetWorkspaceProfileRequest](#memos-api-v2-GetWorkspaceProfileRequest)
- [GetWorkspaceProfileResponse](#memos-api-v2-GetWorkspaceProfileResponse)
- [UpdateWorkspaceProfileRequest](#memos-api-v2-UpdateWorkspaceProfileRequest)
- [UpdateWorkspaceProfileResponse](#memos-api-v2-UpdateWorkspaceProfileResponse)
- [WorkspaceProfile](#memos-api-v2-WorkspaceProfile)
- [WorkspaceService](#memos-api-v2-WorkspaceService)
- [Scalar Value Types](#scalar-value-types) - [Scalar Value Types](#scalar-value-types)
...@@ -2328,110 +2328,6 @@ Used internally for obfuscating the page token. ...@@ -2328,110 +2328,6 @@ Used internally for obfuscating the page token.
<a name="api_v2_system_service-proto"></a>
<p align="right"><a href="#top">Top</a></p>
## api/v2/system_service.proto
<a name="memos-api-v2-GetSystemInfoRequest"></a>
### GetSystemInfoRequest
<a name="memos-api-v2-GetSystemInfoResponse"></a>
### GetSystemInfoResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| system_info | [SystemInfo](#memos-api-v2-SystemInfo) | | |
<a name="memos-api-v2-SystemInfo"></a>
### SystemInfo
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| version | [string](#string) | | |
| mode | [string](#string) | | |
| allow_registration | [bool](#bool) | | |
| disable_password_login | [bool](#bool) | | |
| additional_script | [string](#string) | | |
| additional_style | [string](#string) | | |
| db_size | [int64](#int64) | | |
<a name="memos-api-v2-UpdateSystemInfoRequest"></a>
### UpdateSystemInfoRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| system_info | [SystemInfo](#memos-api-v2-SystemInfo) | | System info is the updated data. |
| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | |
<a name="memos-api-v2-UpdateSystemInfoResponse"></a>
### UpdateSystemInfoResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| system_info | [SystemInfo](#memos-api-v2-SystemInfo) | | |
<a name="memos-api-v2-SystemService"></a>
### SystemService
| Method Name | Request Type | Response Type | Description |
| ----------- | ------------ | ------------- | ------------|
| GetSystemInfo | [GetSystemInfoRequest](#memos-api-v2-GetSystemInfoRequest) | [GetSystemInfoResponse](#memos-api-v2-GetSystemInfoResponse) | |
| UpdateSystemInfo | [UpdateSystemInfoRequest](#memos-api-v2-UpdateSystemInfoRequest) | [UpdateSystemInfoResponse](#memos-api-v2-UpdateSystemInfoResponse) | |
<a name="api_v2_tag_service-proto"></a> <a name="api_v2_tag_service-proto"></a>
<p align="right"><a href="#top">Top</a></p> <p align="right"><a href="#top">Top</a></p>
...@@ -2823,6 +2719,109 @@ Used internally for obfuscating the page token. ...@@ -2823,6 +2719,109 @@ Used internally for obfuscating the page token.
<a name="api_v2_workspace_service-proto"></a>
<p align="right"><a href="#top">Top</a></p>
## api/v2/workspace_service.proto
<a name="memos-api-v2-GetWorkspaceProfileRequest"></a>
### GetWorkspaceProfileRequest
<a name="memos-api-v2-GetWorkspaceProfileResponse"></a>
### GetWorkspaceProfileResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| workspace_profile | [WorkspaceProfile](#memos-api-v2-WorkspaceProfile) | | |
<a name="memos-api-v2-UpdateWorkspaceProfileRequest"></a>
### UpdateWorkspaceProfileRequest
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| workspace_profile | [WorkspaceProfile](#memos-api-v2-WorkspaceProfile) | | System info is the updated data. |
| update_mask | [google.protobuf.FieldMask](#google-protobuf-FieldMask) | | |
<a name="memos-api-v2-UpdateWorkspaceProfileResponse"></a>
### UpdateWorkspaceProfileResponse
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| workspace_profile | [WorkspaceProfile](#memos-api-v2-WorkspaceProfile) | | |
<a name="memos-api-v2-WorkspaceProfile"></a>
### WorkspaceProfile
| Field | Type | Label | Description |
| ----- | ---- | ----- | ----------- |
| version | [string](#string) | | |
| mode | [string](#string) | | |
| allow_registration | [bool](#bool) | | |
| disable_password_login | [bool](#bool) | | |
| additional_script | [string](#string) | | |
| additional_style | [string](#string) | | |
<a name="memos-api-v2-WorkspaceService"></a>
### WorkspaceService
| Method Name | Request Type | Response Type | Description |
| ----------- | ------------ | ------------- | ------------|
| GetWorkspaceProfile | [GetWorkspaceProfileRequest](#memos-api-v2-GetWorkspaceProfileRequest) | [GetWorkspaceProfileResponse](#memos-api-v2-GetWorkspaceProfileResponse) | |
| UpdateWorkspaceProfile | [UpdateWorkspaceProfileRequest](#memos-api-v2-UpdateWorkspaceProfileRequest) | [UpdateWorkspaceProfileResponse](#memos-api-v2-UpdateWorkspaceProfileResponse) | |
## Scalar Value Types ## Scalar Value Types
| .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby | | .proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby |
......
This diff is collapsed.
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: api/v2/system_service.proto
package apiv2
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
const (
SystemService_GetSystemInfo_FullMethodName = "/memos.api.v2.SystemService/GetSystemInfo"
SystemService_UpdateSystemInfo_FullMethodName = "/memos.api.v2.SystemService/UpdateSystemInfo"
)
// SystemServiceClient is the client API for SystemService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type SystemServiceClient interface {
GetSystemInfo(ctx context.Context, in *GetSystemInfoRequest, opts ...grpc.CallOption) (*GetSystemInfoResponse, error)
UpdateSystemInfo(ctx context.Context, in *UpdateSystemInfoRequest, opts ...grpc.CallOption) (*UpdateSystemInfoResponse, error)
}
type systemServiceClient struct {
cc grpc.ClientConnInterface
}
func NewSystemServiceClient(cc grpc.ClientConnInterface) SystemServiceClient {
return &systemServiceClient{cc}
}
func (c *systemServiceClient) GetSystemInfo(ctx context.Context, in *GetSystemInfoRequest, opts ...grpc.CallOption) (*GetSystemInfoResponse, error) {
out := new(GetSystemInfoResponse)
err := c.cc.Invoke(ctx, SystemService_GetSystemInfo_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *systemServiceClient) UpdateSystemInfo(ctx context.Context, in *UpdateSystemInfoRequest, opts ...grpc.CallOption) (*UpdateSystemInfoResponse, error) {
out := new(UpdateSystemInfoResponse)
err := c.cc.Invoke(ctx, SystemService_UpdateSystemInfo_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// SystemServiceServer is the server API for SystemService service.
// All implementations must embed UnimplementedSystemServiceServer
// for forward compatibility
type SystemServiceServer interface {
GetSystemInfo(context.Context, *GetSystemInfoRequest) (*GetSystemInfoResponse, error)
UpdateSystemInfo(context.Context, *UpdateSystemInfoRequest) (*UpdateSystemInfoResponse, error)
mustEmbedUnimplementedSystemServiceServer()
}
// UnimplementedSystemServiceServer must be embedded to have forward compatible implementations.
type UnimplementedSystemServiceServer struct {
}
func (UnimplementedSystemServiceServer) GetSystemInfo(context.Context, *GetSystemInfoRequest) (*GetSystemInfoResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetSystemInfo not implemented")
}
func (UnimplementedSystemServiceServer) UpdateSystemInfo(context.Context, *UpdateSystemInfoRequest) (*UpdateSystemInfoResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateSystemInfo not implemented")
}
func (UnimplementedSystemServiceServer) mustEmbedUnimplementedSystemServiceServer() {}
// UnsafeSystemServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to SystemServiceServer will
// result in compilation errors.
type UnsafeSystemServiceServer interface {
mustEmbedUnimplementedSystemServiceServer()
}
func RegisterSystemServiceServer(s grpc.ServiceRegistrar, srv SystemServiceServer) {
s.RegisterService(&SystemService_ServiceDesc, srv)
}
func _SystemService_GetSystemInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetSystemInfoRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SystemServiceServer).GetSystemInfo(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: SystemService_GetSystemInfo_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SystemServiceServer).GetSystemInfo(ctx, req.(*GetSystemInfoRequest))
}
return interceptor(ctx, in, info, handler)
}
func _SystemService_UpdateSystemInfo_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateSystemInfoRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(SystemServiceServer).UpdateSystemInfo(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: SystemService_UpdateSystemInfo_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(SystemServiceServer).UpdateSystemInfo(ctx, req.(*UpdateSystemInfoRequest))
}
return interceptor(ctx, in, info, handler)
}
// SystemService_ServiceDesc is the grpc.ServiceDesc for SystemService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var SystemService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "memos.api.v2.SystemService",
HandlerType: (*SystemServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetSystemInfo",
Handler: _SystemService_GetSystemInfo_Handler,
},
{
MethodName: "UpdateSystemInfo",
Handler: _SystemService_UpdateSystemInfo_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "api/v2/system_service.proto",
}
This diff is collapsed.
// Code generated by protoc-gen-go-grpc. DO NOT EDIT.
// versions:
// - protoc-gen-go-grpc v1.3.0
// - protoc (unknown)
// source: api/v2/workspace_service.proto
package apiv2
import (
context "context"
grpc "google.golang.org/grpc"
codes "google.golang.org/grpc/codes"
status "google.golang.org/grpc/status"
)
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
// Requires gRPC-Go v1.32.0 or later.
const _ = grpc.SupportPackageIsVersion7
const (
WorkspaceService_GetWorkspaceProfile_FullMethodName = "/memos.api.v2.WorkspaceService/GetWorkspaceProfile"
WorkspaceService_UpdateWorkspaceProfile_FullMethodName = "/memos.api.v2.WorkspaceService/UpdateWorkspaceProfile"
)
// WorkspaceServiceClient is the client API for WorkspaceService service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
type WorkspaceServiceClient interface {
GetWorkspaceProfile(ctx context.Context, in *GetWorkspaceProfileRequest, opts ...grpc.CallOption) (*GetWorkspaceProfileResponse, error)
UpdateWorkspaceProfile(ctx context.Context, in *UpdateWorkspaceProfileRequest, opts ...grpc.CallOption) (*UpdateWorkspaceProfileResponse, error)
}
type workspaceServiceClient struct {
cc grpc.ClientConnInterface
}
func NewWorkspaceServiceClient(cc grpc.ClientConnInterface) WorkspaceServiceClient {
return &workspaceServiceClient{cc}
}
func (c *workspaceServiceClient) GetWorkspaceProfile(ctx context.Context, in *GetWorkspaceProfileRequest, opts ...grpc.CallOption) (*GetWorkspaceProfileResponse, error) {
out := new(GetWorkspaceProfileResponse)
err := c.cc.Invoke(ctx, WorkspaceService_GetWorkspaceProfile_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *workspaceServiceClient) UpdateWorkspaceProfile(ctx context.Context, in *UpdateWorkspaceProfileRequest, opts ...grpc.CallOption) (*UpdateWorkspaceProfileResponse, error) {
out := new(UpdateWorkspaceProfileResponse)
err := c.cc.Invoke(ctx, WorkspaceService_UpdateWorkspaceProfile_FullMethodName, in, out, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// WorkspaceServiceServer is the server API for WorkspaceService service.
// All implementations must embed UnimplementedWorkspaceServiceServer
// for forward compatibility
type WorkspaceServiceServer interface {
GetWorkspaceProfile(context.Context, *GetWorkspaceProfileRequest) (*GetWorkspaceProfileResponse, error)
UpdateWorkspaceProfile(context.Context, *UpdateWorkspaceProfileRequest) (*UpdateWorkspaceProfileResponse, error)
mustEmbedUnimplementedWorkspaceServiceServer()
}
// UnimplementedWorkspaceServiceServer must be embedded to have forward compatible implementations.
type UnimplementedWorkspaceServiceServer struct {
}
func (UnimplementedWorkspaceServiceServer) GetWorkspaceProfile(context.Context, *GetWorkspaceProfileRequest) (*GetWorkspaceProfileResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method GetWorkspaceProfile not implemented")
}
func (UnimplementedWorkspaceServiceServer) UpdateWorkspaceProfile(context.Context, *UpdateWorkspaceProfileRequest) (*UpdateWorkspaceProfileResponse, error) {
return nil, status.Errorf(codes.Unimplemented, "method UpdateWorkspaceProfile not implemented")
}
func (UnimplementedWorkspaceServiceServer) mustEmbedUnimplementedWorkspaceServiceServer() {}
// UnsafeWorkspaceServiceServer may be embedded to opt out of forward compatibility for this service.
// Use of this interface is not recommended, as added methods to WorkspaceServiceServer will
// result in compilation errors.
type UnsafeWorkspaceServiceServer interface {
mustEmbedUnimplementedWorkspaceServiceServer()
}
func RegisterWorkspaceServiceServer(s grpc.ServiceRegistrar, srv WorkspaceServiceServer) {
s.RegisterService(&WorkspaceService_ServiceDesc, srv)
}
func _WorkspaceService_GetWorkspaceProfile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetWorkspaceProfileRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WorkspaceServiceServer).GetWorkspaceProfile(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: WorkspaceService_GetWorkspaceProfile_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WorkspaceServiceServer).GetWorkspaceProfile(ctx, req.(*GetWorkspaceProfileRequest))
}
return interceptor(ctx, in, info, handler)
}
func _WorkspaceService_UpdateWorkspaceProfile_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(UpdateWorkspaceProfileRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(WorkspaceServiceServer).UpdateWorkspaceProfile(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: WorkspaceService_UpdateWorkspaceProfile_FullMethodName,
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(WorkspaceServiceServer).UpdateWorkspaceProfile(ctx, req.(*UpdateWorkspaceProfileRequest))
}
return interceptor(ctx, in, info, handler)
}
// WorkspaceService_ServiceDesc is the grpc.ServiceDesc for WorkspaceService service.
// It's only intended for direct use with grpc.RegisterService,
// and not to be introspected or modified (even as a copy)
var WorkspaceService_ServiceDesc = grpc.ServiceDesc{
ServiceName: "memos.api.v2.WorkspaceService",
HandlerType: (*WorkspaceServiceServer)(nil),
Methods: []grpc.MethodDesc{
{
MethodName: "GetWorkspaceProfile",
Handler: _WorkspaceService_GetWorkspaceProfile_Handler,
},
{
MethodName: "UpdateWorkspaceProfile",
Handler: _WorkspaceService_UpdateWorkspaceProfile_Handler,
},
},
Streams: []grpc.StreamDesc{},
Metadata: "api/v2/workspace_service.proto",
}
...@@ -16,13 +16,11 @@ const getCellAdditionalStyles = (count: number, maxCount: number) => { ...@@ -16,13 +16,11 @@ const getCellAdditionalStyles = (count: number, maxCount: number) => {
const ratio = count / maxCount; const ratio = count / maxCount;
if (ratio > 0.7) { if (ratio > 0.7) {
return "bg-blue-600 text-gray-200"; return "bg-blue-600 text-gray-100 dark:opacity-80";
} else if (ratio > 0.5) { } else if (ratio > 0.4) {
return "bg-blue-400 text-gray-200 dark:opacity-80"; return "bg-blue-400 text-gray-200 dark:opacity-80";
} else if (ratio > 0.3) {
return "bg-blue-300 text-gray-200 dark:opacity-80";
} else { } else {
return "bg-blue-200 text-gray-200 dark:opacity-80"; return "bg-blue-300 text-gray-600 dark:opacity-80";
} }
}; };
......
...@@ -3,7 +3,6 @@ import { useEffect, useState } from "react"; ...@@ -3,7 +3,6 @@ import { useEffect, useState } from "react";
import { toast } from "react-hot-toast"; import { toast } from "react-hot-toast";
import { Link } from "react-router-dom"; import { Link } from "react-router-dom";
import * as api from "@/helpers/api"; import * as api from "@/helpers/api";
import { formatBytes } from "@/helpers/utils";
import { useGlobalStore } from "@/store/module"; import { useGlobalStore } from "@/store/module";
import { useTranslate } from "@/utils/i18n"; import { useTranslate } from "@/utils/i18n";
import { showCommonDialog } from "../Dialog/CommonDialog"; import { showCommonDialog } from "../Dialog/CommonDialog";
...@@ -12,7 +11,6 @@ import Icon from "../Icon"; ...@@ -12,7 +11,6 @@ import Icon from "../Icon";
import showUpdateCustomizedProfileDialog from "../UpdateCustomizedProfileDialog"; import showUpdateCustomizedProfileDialog from "../UpdateCustomizedProfileDialog";
interface State { interface State {
dbSize: number;
allowSignUp: boolean; allowSignUp: boolean;
disablePasswordLogin: boolean; disablePasswordLogin: boolean;
disablePublicMemos: boolean; disablePublicMemos: boolean;
...@@ -27,7 +25,6 @@ const SystemSection = () => { ...@@ -27,7 +25,6 @@ const SystemSection = () => {
const globalStore = useGlobalStore(); const globalStore = useGlobalStore();
const systemStatus = globalStore.state.systemStatus; const systemStatus = globalStore.state.systemStatus;
const [state, setState] = useState<State>({ const [state, setState] = useState<State>({
dbSize: systemStatus.dbSize,
allowSignUp: systemStatus.allowSignUp, allowSignUp: systemStatus.allowSignUp,
disablePasswordLogin: systemStatus.disablePasswordLogin, disablePasswordLogin: systemStatus.disablePasswordLogin,
additionalStyle: systemStatus.additionalStyle, additionalStyle: systemStatus.additionalStyle,
...@@ -59,7 +56,6 @@ const SystemSection = () => { ...@@ -59,7 +56,6 @@ const SystemSection = () => {
useEffect(() => { useEffect(() => {
setState({ setState({
...state, ...state,
dbSize: systemStatus.dbSize,
allowSignUp: systemStatus.allowSignUp, allowSignUp: systemStatus.allowSignUp,
disablePasswordLogin: systemStatus.disablePasswordLogin, disablePasswordLogin: systemStatus.disablePasswordLogin,
additionalStyle: systemStatus.additionalStyle, additionalStyle: systemStatus.additionalStyle,
...@@ -107,17 +103,6 @@ const SystemSection = () => { ...@@ -107,17 +103,6 @@ const SystemSection = () => {
showUpdateCustomizedProfileDialog(); showUpdateCustomizedProfileDialog();
}; };
const handleVacuumBtnClick = async () => {
try {
await api.vacuumDatabase();
await globalStore.fetchSystemStatus();
} catch (error) {
console.error(error);
return;
}
toast.success(t("message.succeed-vacuum-database"));
};
const handleInstanceUrlChanged = (value: string) => { const handleInstanceUrlChanged = (value: string) => {
setInstanceUrl(value); setInstanceUrl(value);
}; };
...@@ -251,17 +236,6 @@ const SystemSection = () => { ...@@ -251,17 +236,6 @@ const SystemSection = () => {
</div> </div>
<Button onClick={handleUpdateCustomizedProfileButtonClick}>{t("common.edit")}</Button> <Button onClick={handleUpdateCustomizedProfileButtonClick}>{t("common.edit")}</Button>
</div> </div>
<div className="w-full flex flex-row justify-between items-center">
<div className="flex flex-row items-center">
<span className="text-sm">
{t("setting.system-section.database-file-size")}: <span className="font-mono font-bold">{formatBytes(state.dbSize)}</span>
</span>
<Tooltip title={t("setting.system-section.vacuum-hint")} placement="top">
<Icon.HelpCircle className="w-4 h-auto" />
</Tooltip>
</div>
<Button onClick={handleVacuumBtnClick}>{t("common.vacuum")}</Button>
</div>
<p className="font-medium text-gray-700 dark:text-gray-500">{t("common.settings")}</p> <p className="font-medium text-gray-700 dark:text-gray-500">{t("common.settings")}</p>
<div className="w-full flex flex-row justify-between items-center"> <div className="w-full flex flex-row justify-between items-center">
<span className="normal-text">{t("setting.system-section.allow-user-signup")}</span> <span className="normal-text">{t("setting.system-section.allow-user-signup")}</span>
......
...@@ -5,10 +5,10 @@ import { InboxServiceDefinition } from "./types/proto/api/v2/inbox_service"; ...@@ -5,10 +5,10 @@ import { InboxServiceDefinition } from "./types/proto/api/v2/inbox_service";
import { MarkdownServiceDefinition } from "./types/proto/api/v2/markdown_service"; import { MarkdownServiceDefinition } from "./types/proto/api/v2/markdown_service";
import { MemoServiceDefinition } from "./types/proto/api/v2/memo_service"; import { MemoServiceDefinition } from "./types/proto/api/v2/memo_service";
import { ResourceServiceDefinition } from "./types/proto/api/v2/resource_service"; import { ResourceServiceDefinition } from "./types/proto/api/v2/resource_service";
import { SystemServiceDefinition } from "./types/proto/api/v2/system_service";
import { TagServiceDefinition } from "./types/proto/api/v2/tag_service"; import { TagServiceDefinition } from "./types/proto/api/v2/tag_service";
import { UserServiceDefinition } from "./types/proto/api/v2/user_service"; import { UserServiceDefinition } from "./types/proto/api/v2/user_service";
import { WebhookServiceDefinition } from "./types/proto/api/v2/webhook_service"; import { WebhookServiceDefinition } from "./types/proto/api/v2/webhook_service";
import { WorkspaceServiceDefinition } from "./types/proto/api/v2/workspace_service";
const channel = createChannel( const channel = createChannel(
window.location.origin, window.location.origin,
...@@ -19,6 +19,8 @@ const channel = createChannel( ...@@ -19,6 +19,8 @@ const channel = createChannel(
const clientFactory = createClientFactory(); const clientFactory = createClientFactory();
export const workspaceServiceClient = clientFactory.create(WorkspaceServiceDefinition, channel);
export const authServiceClient = clientFactory.create(AuthServiceDefinition, channel); export const authServiceClient = clientFactory.create(AuthServiceDefinition, channel);
export const userServiceClient = clientFactory.create(UserServiceDefinition, channel); export const userServiceClient = clientFactory.create(UserServiceDefinition, channel);
...@@ -27,8 +29,6 @@ export const memoServiceClient = clientFactory.create(MemoServiceDefinition, cha ...@@ -27,8 +29,6 @@ export const memoServiceClient = clientFactory.create(MemoServiceDefinition, cha
export const resourceServiceClient = clientFactory.create(ResourceServiceDefinition, channel); export const resourceServiceClient = clientFactory.create(ResourceServiceDefinition, channel);
export const systemServiceClient = clientFactory.create(SystemServiceDefinition, channel);
export const tagServiceClient = clientFactory.create(TagServiceDefinition, channel); export const tagServiceClient = clientFactory.create(TagServiceDefinition, channel);
export const inboxServiceClient = clientFactory.create(InboxServiceDefinition, channel); export const inboxServiceClient = clientFactory.create(InboxServiceDefinition, channel);
......
...@@ -13,10 +13,6 @@ export function upsertSystemSetting(systemSetting: SystemSetting) { ...@@ -13,10 +13,6 @@ export function upsertSystemSetting(systemSetting: SystemSetting) {
return axios.post<SystemSetting>("/api/v1/system/setting", systemSetting); return axios.post<SystemSetting>("/api/v1/system/setting", systemSetting);
} }
export function vacuumDatabase() {
return axios.post("/api/v1/system/vacuum");
}
export function signin(username: string, password: string, remember: boolean) { export function signin(username: string, password: string, remember: boolean) {
return axios.post<User>("/api/v1/auth/signin", { return axios.post<User>("/api/v1/auth/signin", {
username, username,
......
import { systemServiceClient } from "@/grpcweb";
import * as api from "@/helpers/api"; import * as api from "@/helpers/api";
import storage from "@/helpers/storage"; import storage from "@/helpers/storage";
import i18n from "@/i18n"; import i18n from "@/i18n";
...@@ -72,8 +71,6 @@ export const useGlobalStore = () => { ...@@ -72,8 +71,6 @@ export const useGlobalStore = () => {
}, },
fetchSystemStatus: async () => { fetchSystemStatus: async () => {
const { data: systemStatus } = await api.getSystemStatus(); const { data: systemStatus } = await api.getSystemStatus();
const { systemInfo } = await systemServiceClient.getSystemInfo({});
systemStatus.dbSize = systemInfo?.dbSize || 0;
store.dispatch(setGlobalState({ systemStatus: systemStatus })); store.dispatch(setGlobalState({ systemStatus: systemStatus }));
return systemStatus; return systemStatus;
}, },
......
...@@ -17,7 +17,6 @@ const globalSlice = createSlice({ ...@@ -17,7 +17,6 @@ const globalSlice = createSlice({
mode: "demo", mode: "demo",
version: "", version: "",
}, },
dbSize: 0,
allowSignUp: false, allowSignUp: false,
disablePasswordLogin: false, disablePasswordLogin: false,
disablePublicMemos: false, disablePublicMemos: false,
......
...@@ -15,7 +15,6 @@ interface CustomizedProfile { ...@@ -15,7 +15,6 @@ interface CustomizedProfile {
interface SystemStatus { interface SystemStatus {
host?: User; host?: User;
profile: Profile; profile: Profile;
dbSize: number;
// System settings // System settings
allowSignUp: boolean; allowSignUp: boolean;
disablePasswordLogin: boolean; disablePasswordLogin: boolean;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment