This commit is contained in:
@@ -26,6 +26,7 @@ namespace AyaNova.Biz
|
||||
|
||||
internal static FormCustomBiz GetBiz(AyContext ct, Microsoft.AspNetCore.Http.HttpContext httpContext)
|
||||
{
|
||||
|
||||
return new FormCustomBiz(ct, UserIdFromContext.Id(httpContext.Items), UserLocaleIdFromContext.Id(httpContext.Items), UserRolesFromContext.Roles(httpContext.Items));
|
||||
}
|
||||
|
||||
@@ -88,6 +89,14 @@ namespace AyaNova.Biz
|
||||
//Get one
|
||||
internal async Task<FormCustom> GetAsync(string formKey)
|
||||
{
|
||||
TODO: this must create the formCustom record if it doesn't already exist
|
||||
//Step 1: check if exists, if it does then just return it
|
||||
|
||||
//If it doesn't exist, vet the form key name is ok by checking with this list
|
||||
//FormAvailableFields.AvailableFormKeys
|
||||
// and if it is then create it, save to db and then return it
|
||||
|
||||
|
||||
var ret = await ct.FormCustom.SingleOrDefaultAsync(m => m.FormKey == formKey);
|
||||
//Do not log this, it's going to be called a zillion times anyway
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user