mirror of
https://github.com/aykhans/slash-e.git
synced 2025-07-23 21:34:24 +00:00
chore: update embed frontend
This commit is contained in:
@@ -8,8 +8,9 @@ var allowedMethodsWhenUnauthorized = map[string]bool{
|
||||
"/slash.api.v2.AuthService/SignIn": true,
|
||||
"/slash.api.v2.AuthService/SignUp": true,
|
||||
"/slash.api.v2.AuthService/SignOut": true,
|
||||
"/memos.api.v2.AuthService/GetAuthStatus": true,
|
||||
"/slash.api.v2.ShortcutService/GetShortcut": true,
|
||||
"/slash.api.v2.ShortcutService/GetShortcutById": true,
|
||||
"/slash.api.v2.ShortcutService/GetShortcutByName": true,
|
||||
"/slash.api.v2.CollectionService/GetCollectionByName": true,
|
||||
}
|
||||
|
||||
|
@@ -62,6 +62,8 @@ func (s *APIV2Service) GetWorkspaceSetting(ctx context.Context, _ *apiv2pb.GetWo
|
||||
for _, v := range workspaceSettings {
|
||||
if v.Key == storepb.WorkspaceSettingKey_WORKSAPCE_SETTING_ENABLE_SIGNUP {
|
||||
workspaceSetting.EnableSignup = v.GetEnableSignup()
|
||||
} else if v.Key == storepb.WorkspaceSettingKey_WORKSPACE_SETTING_INSTANCE_URL {
|
||||
workspaceSetting.InstanceUrl = v.GetInstanceUrl()
|
||||
} else if v.Key == storepb.WorkspaceSettingKey_WORKSPACE_SETTING_CUSTOM_STYLE {
|
||||
workspaceSetting.CustomStyle = v.GetCustomStyle()
|
||||
} else if v.Key == storepb.WorkspaceSettingKey_WORKSPACE_SETTING_CUSTOM_SCRIPT {
|
||||
@@ -102,6 +104,15 @@ func (s *APIV2Service) UpdateWorkspaceSetting(ctx context.Context, request *apiv
|
||||
}); err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "failed to update workspace setting: %v", err)
|
||||
}
|
||||
} else if path == "instance_url" {
|
||||
if _, err := s.Store.UpsertWorkspaceSetting(ctx, &storepb.WorkspaceSetting{
|
||||
Key: storepb.WorkspaceSettingKey_WORKSPACE_SETTING_INSTANCE_URL,
|
||||
Value: &storepb.WorkspaceSetting_InstanceUrl{
|
||||
InstanceUrl: request.Setting.InstanceUrl,
|
||||
},
|
||||
}); err != nil {
|
||||
return nil, status.Errorf(codes.Internal, "failed to update workspace setting: %v", err)
|
||||
}
|
||||
} else if path == "custom_style" {
|
||||
if _, err := s.Store.UpsertWorkspaceSetting(ctx, &storepb.WorkspaceSetting{
|
||||
Key: storepb.WorkspaceSettingKey_WORKSPACE_SETTING_CUSTOM_STYLE,
|
||||
|
Reference in New Issue
Block a user