Web: Api: added OwnerId to SettingsController

This commit is contained in:
Nikita Gopienko 2019-10-29 16:41:42 +03:00
parent aae987ebf2
commit 010d6af66b
2 changed files with 8 additions and 2 deletions

View File

@ -126,6 +126,7 @@ namespace ASC.Api.Settings
settings.Timezone = timeZone.Id;
settings.UtcOffset = timeZone.GetUtcOffset(DateTime.UtcNow);
settings.UtcHoursOffset = settings.UtcOffset.TotalHours;
settings.OwnerId = Tenant.OwnerId;
}
return settings;

View File

@ -53,6 +53,10 @@ namespace ASC.Api.Settings
[DataMember(EmitDefaultValue = false)]
public double UtcHoursOffset { get; set; }
[DataMember(EmitDefaultValue = false)]
public Guid OwnerId { get; set; }
public static SettingsWrapper GetSample()
{
return new SettingsWrapper
@ -61,7 +65,8 @@ namespace ASC.Api.Settings
Timezone = TimeZoneInfo.Utc.ToString(),
TrustedDomains = new List<string> { "mydomain.com" },
UtcHoursOffset = -8.5,
UtcOffset = TimeSpan.FromHours(-8.5)
UtcOffset = TimeSpan.FromHours(-8.5),
OwnerId = Guid.NewGuid()
};
}
}