mirror of https://github.com/abpframework/eventhub
15 changed files with 2780 additions and 5 deletions
@ -0,0 +1,11 @@ |
|||
using System; |
|||
|
|||
namespace EventHub.Events |
|||
{ |
|||
public class UpdateEventTimingDto |
|||
{ |
|||
public DateTime StartTime { get; set; } |
|||
|
|||
public DateTime EndTime { get; set; } |
|||
} |
|||
} |
|||
File diff suppressed because it is too large
@ -0,0 +1,24 @@ |
|||
using Microsoft.EntityFrameworkCore.Migrations; |
|||
|
|||
namespace EventHub.Migrations |
|||
{ |
|||
public partial class Added_TimingChangeCount_To_Event : Migration |
|||
{ |
|||
protected override void Up(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.AddColumn<int>( |
|||
name: "TimingChangeCount", |
|||
table: "AppEvents", |
|||
type: "int", |
|||
nullable: false, |
|||
defaultValue: 0); |
|||
} |
|||
|
|||
protected override void Down(MigrationBuilder migrationBuilder) |
|||
{ |
|||
migrationBuilder.DropColumn( |
|||
name: "TimingChangeCount", |
|||
table: "AppEvents"); |
|||
} |
|||
} |
|||
} |
|||
@ -0,0 +1,29 @@ |
|||
using System; |
|||
using System.Threading.Tasks; |
|||
using EventHub.Events; |
|||
using EventHub.Web.Pages.Events; |
|||
using Microsoft.AspNetCore.Authorization; |
|||
using Microsoft.AspNetCore.Mvc; |
|||
using Volo.Abp.AspNetCore.Mvc; |
|||
|
|||
namespace EventHub.Web.Controllers |
|||
{ |
|||
[Route("api/event")] |
|||
public class EventController : AbpController |
|||
{ |
|||
private readonly IEventAppService _eventAppService; |
|||
|
|||
public EventController(IEventAppService eventAppService) |
|||
{ |
|||
_eventAppService = eventAppService; |
|||
} |
|||
|
|||
[Authorize] |
|||
[HttpPost] |
|||
[Route("update-timing")] |
|||
public async Task UpdateEventTiming(EditPageModel.EditEventTimingViewModel input) |
|||
{ |
|||
await _eventAppService.UpdateEventTimingAsync(input.Id, new UpdateEventTimingDto { StartTime = input.StartTime, EndTime = input.EndTime }); |
|||
} |
|||
} |
|||
} |
|||
Loading…
Reference in new issue