-
Notifications
You must be signed in to change notification settings - Fork 72
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not update current client and some refactorings.
- Loading branch information
1 parent
5c7ed75
commit 3d22696
Showing
18 changed files
with
143 additions
and
84 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
cli/Squidex.CLI/Squidex.CLI/Commands/Implementation/Sync/App/Extensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// ========================================================================== | ||
// Squidex Headless CMS | ||
// ========================================================================== | ||
// Copyright (c) Squidex UG (haftungsbeschraenkt) | ||
// All rights reserved. Licensed under the MIT license. | ||
// ========================================================================== | ||
|
||
using Squidex.ClientLibrary.Management; | ||
|
||
namespace Squidex.CLI.Commands.Implementation.Sync.App | ||
{ | ||
public static class Extensions | ||
{ | ||
public static AppRoleModel ToModel(this RoleDto role) | ||
{ | ||
return new AppRoleModel { Permissions = role.Permissions, Properties = role.Properties }; | ||
} | ||
|
||
public static UpdateRoleDto ToUpdate(this AppRoleModel model) | ||
{ | ||
return new UpdateRoleDto { Permissions = model.Permissions, Properties = model.Properties }; | ||
} | ||
|
||
public static AppClientModel ToModel(this ClientDto client) | ||
{ | ||
return new AppClientModel { Name = client.Name, Role = client.Role }; | ||
} | ||
|
||
public static UpdateClientDto ToUpdate(this AppClientModel model) | ||
{ | ||
return new UpdateClientDto { Name = model.Name, Role = model.Role }; | ||
} | ||
|
||
public static UpdateLanguageDto ToModel(this AppLanguageDto language) | ||
{ | ||
return new UpdateLanguageDto | ||
{ | ||
Fallback = language.Fallback, | ||
IsMaster = language.IsMaster, | ||
IsOptional = language.IsOptional | ||
}; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
cli/Squidex.CLI/Squidex.CLI/Commands/Implementation/Sync/Rules/Extensions.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
// ========================================================================== | ||
// Squidex Headless CMS | ||
// ========================================================================== | ||
// Copyright (c) Squidex UG (haftungsbeschraenkt) | ||
// All rights reserved. Licensed under the MIT license. | ||
// ========================================================================== | ||
|
||
using System; | ||
using Squidex.ClientLibrary; | ||
|
||
namespace Squidex.CLI.Commands.Implementation.Sync.Rules | ||
{ | ||
public static class Extensions | ||
{ | ||
public static UpdateExtendableRuleDto ToUpdate(this RuleModel model) | ||
{ | ||
return new UpdateExtendableRuleDto { Action = model.Action, Trigger = model.Trigger, Name = model.Name }; | ||
} | ||
|
||
public static CreateExtendableRuleDto ToCreate(this RuleModel model) | ||
{ | ||
return new CreateExtendableRuleDto { Action = model.Action, Trigger = model.Trigger }; | ||
} | ||
} | ||
} |
Oops, something went wrong.