Browse Source

Build errors fixed.

pull/335/head
Sebastian Stehle 7 years ago
parent
commit
30a8025389
  1. 2
      src/Squidex.Infrastructure/Commands/DomainObjectGrainBase.cs
  2. 3
      src/Squidex/Areas/Api/Controllers/Schemas/Models/Fields/BooleanFieldPropertiesDto.cs
  3. 4
      src/Squidex/Areas/Api/Controllers/Schemas/Models/Fields/DateTimeFieldPropertiesDto.cs
  4. 3
      src/Squidex/Areas/Api/Controllers/Schemas/Models/Fields/GeolocationFieldPropertiesDto.cs
  5. 3
      src/Squidex/Areas/Api/Controllers/Schemas/Models/Fields/NumberFieldPropertiesDto.cs
  6. 3
      src/Squidex/Areas/Api/Controllers/Schemas/Models/Fields/StringFieldPropertiesDto.cs
  7. 3
      src/Squidex/Areas/Api/Controllers/Schemas/Models/Fields/TagsFieldPropertiesDto.cs
  8. 3
      src/Squidex/Areas/Api/Controllers/UI/UIController.cs
  9. 14
      src/Squidex/Pipeline/Diagnostics/HealthCheckMiddleware.cs

2
src/Squidex.Infrastructure/Commands/DomainObjectGrainBase.cs

@ -221,7 +221,7 @@ namespace Squidex.Infrastructure.Commands
{
var result = await ExecuteAsync(command.Value);
return result.AsJ();
return result;
}
protected abstract Task<object> ExecuteAsync(IAggregateCommand command);

3
src/Squidex/Areas/Api/Controllers/Schemas/Models/Fields/BooleanFieldPropertiesDto.cs

@ -5,8 +5,6 @@
// All rights reserved. Licensed under the MIT license.
// ==========================================================================
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using NJsonSchema.Annotations;
using Squidex.Domain.Apps.Core.Schemas;
using Squidex.Infrastructure.Reflection;
@ -29,7 +27,6 @@ namespace Squidex.Areas.Api.Controllers.Schemas.Models.Fields
/// <summary>
/// The editor that is used to manage this field.
/// </summary>
[JsonConverter(typeof(StringEnumConverter))]
public BooleanFieldEditor Editor { get; set; }
public override FieldProperties ToProperties()

4
src/Squidex/Areas/Api/Controllers/Schemas/Models/Fields/DateTimeFieldPropertiesDto.cs

@ -5,8 +5,6 @@
// All rights reserved. Licensed under the MIT license.
// ==========================================================================
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using NJsonSchema.Annotations;
using NodaTime;
using Squidex.Domain.Apps.Core.Schemas;
@ -35,13 +33,11 @@ namespace Squidex.Areas.Api.Controllers.Schemas.Models.Fields
/// <summary>
/// The editor that is used to manage this field.
/// </summary>
[JsonConverter(typeof(StringEnumConverter))]
public DateTimeFieldEditor Editor { get; set; }
/// <summary>
/// The calculated default value for the field value.
/// </summary>
[JsonConverter(typeof(StringEnumConverter))]
public DateTimeCalculatedDefaultValue? CalculatedDefaultValue { get; set; }
public override FieldProperties ToProperties()

3
src/Squidex/Areas/Api/Controllers/Schemas/Models/Fields/GeolocationFieldPropertiesDto.cs

@ -5,8 +5,6 @@
// All rights reserved. Licensed under the MIT license.
// ==========================================================================
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using NJsonSchema.Annotations;
using Squidex.Domain.Apps.Core.Schemas;
using Squidex.Infrastructure.Reflection;
@ -24,7 +22,6 @@ namespace Squidex.Areas.Api.Controllers.Schemas.Models.Fields
/// <summary>
/// The editor that is used to manage this field.
/// </summary>
[JsonConverter(typeof(StringEnumConverter))]
public GeolocationFieldEditor Editor { get; set; }
public override FieldProperties ToProperties()

3
src/Squidex/Areas/Api/Controllers/Schemas/Models/Fields/NumberFieldPropertiesDto.cs

@ -5,8 +5,6 @@
// All rights reserved. Licensed under the MIT license.
// ==========================================================================
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using NJsonSchema.Annotations;
using Squidex.Domain.Apps.Core.Schemas;
using Squidex.Infrastructure.Collections;
@ -45,7 +43,6 @@ namespace Squidex.Areas.Api.Controllers.Schemas.Models.Fields
/// <summary>
/// The editor that is used to manage this field.
/// </summary>
[JsonConverter(typeof(StringEnumConverter))]
public NumberFieldEditor Editor { get; set; }
public override FieldProperties ToProperties()

3
src/Squidex/Areas/Api/Controllers/Schemas/Models/Fields/StringFieldPropertiesDto.cs

@ -5,8 +5,6 @@
// All rights reserved. Licensed under the MIT license.
// ==========================================================================
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using NJsonSchema.Annotations;
using Squidex.Domain.Apps.Core.Schemas;
using Squidex.Infrastructure.Collections;
@ -55,7 +53,6 @@ namespace Squidex.Areas.Api.Controllers.Schemas.Models.Fields
/// <summary>
/// The editor that is used to manage this field.
/// </summary>
[JsonConverter(typeof(StringEnumConverter))]
public StringFieldEditor Editor { get; set; }
public override FieldProperties ToProperties()

3
src/Squidex/Areas/Api/Controllers/Schemas/Models/Fields/TagsFieldPropertiesDto.cs

@ -5,8 +5,6 @@
// All rights reserved. Licensed under the MIT license.
// ==========================================================================
using Newtonsoft.Json;
using Newtonsoft.Json.Converters;
using NJsonSchema.Annotations;
using Squidex.Domain.Apps.Core.Schemas;
using Squidex.Infrastructure.Collections;
@ -35,7 +33,6 @@ namespace Squidex.Areas.Api.Controllers.Schemas.Models.Fields
/// <summary>
/// The editor that is used to manage this field.
/// </summary>
[JsonConverter(typeof(StringEnumConverter))]
public TagsFieldEditor Editor { get; set; }
public override FieldProperties ToProperties()

3
src/Squidex/Areas/Api/Controllers/UI/UIController.cs

@ -14,6 +14,7 @@ using Squidex.Config;
using Squidex.Domain.Apps.Entities.Apps;
using Squidex.Extensions.Actions.Twitter;
using Squidex.Infrastructure.Commands;
using Squidex.Infrastructure.Orleans;
using Squidex.Pipeline;
namespace Squidex.Areas.Api.Controllers.UI
@ -78,7 +79,7 @@ namespace Squidex.Areas.Api.Controllers.UI
[ApiPermission]
public async Task<IActionResult> PutSetting(string app, string key, [FromBody] UpdateSettingDto request)
{
await grainFactory.GetGrain<IAppUISettingsGrain>(AppId).SetAsync(key, request.Value);
await grainFactory.GetGrain<IAppUISettingsGrain>(AppId).SetAsync(key, request.Value.AsJ());
return NoContent();
}

14
src/Squidex/Pipeline/Diagnostics/HealthCheckMiddleware.cs

@ -11,9 +11,9 @@ using System.Linq;
using System.Threading;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Http;
using Newtonsoft.Json;
using Squidex.Infrastructure;
using Squidex.Infrastructure.Diagnostics;
using Squidex.Infrastructure.Json;
namespace Squidex.Pipeline.Diagnostics
{
@ -23,19 +23,19 @@ namespace Squidex.Pipeline.Diagnostics
private static readonly TimeSpan Timeout = TimeSpan.FromSeconds(2);
private readonly Dictionary<string, IHealthCheck> healthChecks;
private readonly JsonSerializerSettings serializerSettings;
private readonly IJsonSerializer serializer;
private readonly RequestDelegate next;
private readonly List<string> scopes;
public HealthCheckMiddleware(IEnumerable<IHealthCheck> healthChecks, JsonSerializerSettings serializerSettings, RequestDelegate next, string scopes)
public HealthCheckMiddleware(IEnumerable<IHealthCheck> healthChecks, IJsonSerializer serializer, RequestDelegate next, string scopes)
{
Guard.NotNull(healthChecks, nameof(healthChecks));
Guard.NotNull(serializerSettings, nameof(serializerSettings));
Guard.NotNull(serializer, nameof(serializer));
this.healthChecks = healthChecks.ToDictionary(GetName);
this.next = next;
this.serializer = serializer;
this.scopes = SplitScopes(scopes);
this.serializerSettings = serializerSettings;
}
public async Task Invoke(HttpContext context)
@ -58,7 +58,9 @@ namespace Squidex.Pipeline.Diagnostics
var response = results.ToDictionary(x => x.Name, x => x.Result);
await context.Response.WriteAsync(JsonConvert.SerializeObject(new { status = response }, Formatting.Indented, serializerSettings));
var json = serializer.Serialize(new { status = response });
await context.Response.WriteAsync(json);
}
}
else

Loading…
Cancel
Save