";
System.Text.RegularExpressions.Regex reg = new System.Text.RegularExpressions.Regex(@"(?<=\s)\s+");
resp = reg.Replace(resp, string.Empty).Replace("\n", "").Replace("\t", "");
return new ContentResult
{
ContentType = "text/html",
StatusCode = 200,
Content = resp
};
}
///
/// Get API server info for ABOUT form AyaNova display
///
/// API server info
[HttpGet("server-info")]
public ActionResult ServerInfo()
{
return Ok(new
{
data = new
{
ServerVersion = AyaNovaVersion.FullNameAndVersion,
DBSchemaVersion = AySchema.currentSchema,
ServerLocalTime = DateUtil.ServerDateTimeString(System.DateTime.UtcNow),
ServerTimeZone = TimeZoneInfo.Local.Id,
ServerDbId = AyaNova.Core.License.ServerDbId,
License = AyaNova.Core.License.LicenseInfoAsJson,
#if (SUBSCRIPTION_BUILD)
Build = "Subscription"
#else
Build = "Perpetual"
#endif
}
});
}
///
/// Get list of types and roles required
///
/// A list of AyaType role rights
[HttpGet("role-rights")]
public ActionResult RoleRights()
{
return Ok(new
{
data = new
{
AyaTypes = BizRoles.roles.OrderBy(z => z.Key.ToString()).Select(z => new { AyaType = z.Key.ToString(), Change = z.Value.Change.ToString(), ReadFullRecord = z.Value.ReadFullRecord.ToString(), Select = z.Value.Select.ToString() }).ToList()
}
});
}
#if (DEBUG)
///
/// Get build mode of server, used for automated testing purposes
///
/// "DEBUG" or "RELEASE"
[HttpGet("build-mode")]
public ActionResult BuildMode()
{
return Ok(new { data = new { BuildMode = "DEBUG" } });
}
#else
///
/// Get build mode of server, used for automated testing purposes
///
/// "DEBUG" or "RELEASE"
[HttpGet("build-mode")]
public ActionResult BuildMode()
{
return Ok(new { data = new { BuildMode = "RELEASE" } });
}
#endif
}
}
#region sigtest script
/*