cleanup
This commit is contained in:
parent
1b910adf55
commit
af441e772b
34 changed files with 279 additions and 292 deletions
|
@ -37,48 +37,49 @@ namespace Sledgemapper.Api.Controllers
|
|||
public async Task Post(string sessionName, [FromBody] Session session)
|
||||
{
|
||||
var userId = int.Parse(HttpContext.User.Identity.Name);
|
||||
await _mediator.Send(new SaveNewSnapshotCommand(sessionName, session, userId));
|
||||
await _mediator.Send(new NewSnapshotCommand(sessionName, session, userId));
|
||||
}
|
||||
|
||||
[HttpPost("tile")]
|
||||
public async Task Post(string sessionName, [FromBody] Tile tile)
|
||||
{
|
||||
var userId = int.Parse(HttpContext.User.Identity.Name);
|
||||
await _mediator.Send(new SaveNewTileCommand(sessionName, tile, userId)); }
|
||||
await _mediator.Send(new NewTileCommand(sessionName, tile, userId));
|
||||
}
|
||||
|
||||
[HttpPost("overlay")]
|
||||
public async Task Post(string sessionName, [FromBody] Overlay overlay)
|
||||
{
|
||||
var userId = int.Parse(HttpContext.User.Identity.Name);
|
||||
await _mediator.Publish(new NewOverlayNotification(sessionName, overlay,userId));
|
||||
await _mediator.Publish(new NewOverlayCommand(sessionName, overlay, userId));
|
||||
}
|
||||
|
||||
[HttpPost("wall")]
|
||||
public async Task Post(string sessionName, [FromBody] Wall wall)
|
||||
{
|
||||
var userId = int.Parse(HttpContext.User.Identity.Name);
|
||||
await _mediator.Publish(new NewWallNotification(sessionName, wall,userId));
|
||||
await _mediator.Publish(new NewWallCommand(sessionName, wall, userId));
|
||||
}
|
||||
|
||||
[HttpDelete("tile")]
|
||||
public async Task Delete(string sessionName, [FromBody] Tile tile)
|
||||
{
|
||||
var userId = int.Parse(HttpContext.User.Identity.Name);
|
||||
await _mediator.Publish(new DeleteTileNotification(sessionName, tile,userId));
|
||||
await _mediator.Publish(new DeleteTileCommand(sessionName, tile, userId));
|
||||
}
|
||||
|
||||
[HttpDelete("overlay")]
|
||||
public async Task Delete(string sessionName, [FromBody] Overlay overlay)
|
||||
{
|
||||
var userId = int.Parse(HttpContext.User.Identity.Name);
|
||||
await _mediator.Publish(new DeleteOverlayNotification(sessionName, overlay,userId));
|
||||
await _mediator.Publish(new DeleteOverlayCommand(sessionName, overlay, userId));
|
||||
}
|
||||
|
||||
[HttpDelete("wall")]
|
||||
public async Task Delete(string sessionName, [FromBody] Wall wall)
|
||||
{
|
||||
var userId = int.Parse(HttpContext.User.Identity.Name);
|
||||
await _mediator.Publish(new DeleteWallNotification(sessionName, wall,userId));
|
||||
await _mediator.Publish(new DeleteWallCommand(sessionName, wall, userId));
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue