-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev' into #20-Seat-Selection
- Loading branch information
Showing
42 changed files
with
1,214 additions
and
475 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using api_adept.Models; | ||
using api_adept.Services; | ||
using Microsoft.AspNetCore.Mvc; | ||
|
||
namespace api_adept.Controllers | ||
{ | ||
[ApiController] | ||
[Route("/api/lan")] | ||
public class LanApiController : AdeptController | ||
{ | ||
private ILanService _lanService; | ||
public LanApiController(IUsersService _userService, ILanService lanService) : base(_userService) | ||
{ | ||
_lanService = lanService; | ||
} | ||
|
||
[HttpGet("current")] | ||
public Lan GetCurrentLan() | ||
{ | ||
Lan currentLan = _lanService.GetLatestLan(); | ||
|
||
return currentLan; | ||
} | ||
|
||
[HttpPost("create")] | ||
public Lan Create([FromBody] Lan lan) | ||
{ | ||
Lan newLan = _lanService.Create(lan); | ||
|
||
return newLan; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
213 changes: 213 additions & 0 deletions
213
api-adept/api-adept/Migrations/20220924025138_LansUpdate.Designer.cs
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
37 changes: 37 additions & 0 deletions
37
api-adept/api-adept/Migrations/20220924025138_LansUpdate.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
using System; | ||
using Microsoft.EntityFrameworkCore.Migrations; | ||
|
||
#nullable disable | ||
|
||
namespace api_adept.Migrations | ||
{ | ||
public partial class LansUpdate : Migration | ||
{ | ||
protected override void Up(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.RenameColumn( | ||
name: "Date", | ||
table: "Lans", | ||
newName: "StartingDate"); | ||
|
||
migrationBuilder.AddColumn<DateTime>( | ||
name: "InscriptionDate", | ||
table: "Lans", | ||
type: "datetime2", | ||
nullable: false, | ||
defaultValue: new DateTime(1, 1, 1, 0, 0, 0, 0, DateTimeKind.Unspecified)); | ||
} | ||
|
||
protected override void Down(MigrationBuilder migrationBuilder) | ||
{ | ||
migrationBuilder.DropColumn( | ||
name: "InscriptionDate", | ||
table: "Lans"); | ||
|
||
migrationBuilder.RenameColumn( | ||
name: "StartingDate", | ||
table: "Lans", | ||
newName: "Date"); | ||
} | ||
} | ||
} |
Oops, something went wrong.