This commit is contained in:
@@ -168,6 +168,10 @@ namespace AyaNova.Api.Controllers
|
|||||||
{
|
{
|
||||||
//save and success return
|
//save and success return
|
||||||
await ct.SaveChangesAsync();
|
await ct.SaveChangesAsync();
|
||||||
|
|
||||||
|
//Log
|
||||||
|
EventLogProcessor.AddEntry(new Event(biz.userId, o.Id, AyaType.Tag, AyaEvent.Created), ct);
|
||||||
|
|
||||||
return CreatedAtAction("GetTag", new { id = o.Id }, new ApiCreatedResponse(o));
|
return CreatedAtAction("GetTag", new { id = o.Id }, new ApiCreatedResponse(o));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -236,6 +240,9 @@ namespace AyaNova.Api.Controllers
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Log
|
||||||
|
EventLogProcessor.AddEntry(new Event(biz.userId, oFromDb.Id, AyaType.Tag, AyaEvent.Modified), ct);
|
||||||
|
|
||||||
return Ok(new ApiOkResponse(new { ConcurrencyToken = oFromDb.ConcurrencyToken }));
|
return Ok(new ApiOkResponse(new { ConcurrencyToken = oFromDb.ConcurrencyToken }));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -301,6 +308,9 @@ namespace AyaNova.Api.Controllers
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Log
|
||||||
|
EventLogProcessor.AddEntry(new Event(biz.userId, oFromDb.Id, AyaType.Tag, AyaEvent.Modified), ct);
|
||||||
|
|
||||||
return Ok(new ApiOkResponse(new { ConcurrencyToken = oFromDb.ConcurrencyToken }));
|
return Ok(new ApiOkResponse(new { ConcurrencyToken = oFromDb.ConcurrencyToken }));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -346,6 +356,9 @@ namespace AyaNova.Api.Controllers
|
|||||||
}
|
}
|
||||||
|
|
||||||
await ct.SaveChangesAsync();
|
await ct.SaveChangesAsync();
|
||||||
|
|
||||||
|
//Log
|
||||||
|
EventLogProcessor.DeleteObject(biz.userId, AyaType.Tag, dbObj.Id, dbObj.Name, ct);
|
||||||
|
|
||||||
return NoContent();
|
return NoContent();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -135,6 +135,9 @@ namespace AyaNova.Api.Controllers
|
|||||||
{
|
{
|
||||||
//save and success return
|
//save and success return
|
||||||
await ct.SaveChangesAsync();
|
await ct.SaveChangesAsync();
|
||||||
|
|
||||||
|
//BIZLOG: Not going to log this for now, it's too common an operation and would require bringing in more info. If decide to implement should log the parent object with text of tag instead
|
||||||
|
|
||||||
return CreatedAtAction("GetTagMap", new { id = o.Id }, new ApiCreatedResponse(o));
|
return CreatedAtAction("GetTagMap", new { id = o.Id }, new ApiCreatedResponse(o));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -187,6 +190,8 @@ namespace AyaNova.Api.Controllers
|
|||||||
|
|
||||||
await ct.SaveChangesAsync();
|
await ct.SaveChangesAsync();
|
||||||
|
|
||||||
|
//BIZLOG: Not going to log this for now, it's too common an operation and would require bringing in more info. If decide to implement should log the parent object with text of tag instead
|
||||||
|
|
||||||
return NoContent();
|
return NoContent();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -86,23 +86,7 @@ namespace AyaNova.Api.Controllers
|
|||||||
|
|
||||||
JObject o = JObject.FromObject(new
|
JObject o = JObject.FromObject(new
|
||||||
{
|
{
|
||||||
seedLevel = seedLevel
|
seedLevel = seedLevel
|
||||||
// channel = new
|
|
||||||
// {
|
|
||||||
// title = "Star Wars",
|
|
||||||
// link = "http://www.starwars.com",
|
|
||||||
// description = "Star Wars blog.",
|
|
||||||
// item =
|
|
||||||
// from p in posts
|
|
||||||
// orderby p.Title
|
|
||||||
// select new
|
|
||||||
// {
|
|
||||||
// title = p.Title,
|
|
||||||
// description = p.Description,
|
|
||||||
// link = p.Link,
|
|
||||||
// category = p.Categories
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
});
|
});
|
||||||
|
|
||||||
OpsJob j = new OpsJob();
|
OpsJob j = new OpsJob();
|
||||||
@@ -111,6 +95,10 @@ namespace AyaNova.Api.Controllers
|
|||||||
j.Exclusive=true;//don't run other jobs, this will erase the db
|
j.Exclusive=true;//don't run other jobs, this will erase the db
|
||||||
j.JobInfo = o.ToString();
|
j.JobInfo = o.ToString();
|
||||||
JobsBiz.AddJob(j, ct);
|
JobsBiz.AddJob(j, ct);
|
||||||
|
|
||||||
|
//Log
|
||||||
|
EventLogProcessor.AddEntry(new Event(UserIdFromContext.Id(HttpContext.Items), 0, AyaType.TrialSeeder, AyaEvent.Created,size), ct);
|
||||||
|
|
||||||
return Accepted(new { JobId = j.GId });//202 accepted
|
return Accepted(new { JobId = j.GId });//202 accepted
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,8 @@ namespace AyaNova.Biz
|
|||||||
AttachmentDownload=6,
|
AttachmentDownload=6,
|
||||||
LicenseFetch=7,
|
LicenseFetch=7,
|
||||||
LicenseTrialRequest=8,
|
LicenseTrialRequest=8,
|
||||||
ServerStateChange=9
|
ServerStateChange=9,
|
||||||
|
SeedDatabase=10
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user