returning pb
This commit is contained in:
1 parent
51a3255b55
commit
1fb2d9eb1d
7 files changed
+141
-45
No files matched your search
@@ -1,4 +1,6 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System.Data.SqlClient;
|
||||
using Server.Models;
|
||||
|
||||
namespace Server.Controllers;
|
||||
@@ -25,29 +27,6 @@ public class LapController : ControllerBase {
|
||||
});
|
||||
}
|
||||
|
||||
// [HttpGet()]
|
||||
// public LapStorageDTO UserLaps(Guid userId, string mapName) {
|
||||
// List<Lap> laps = _db.Laps
|
||||
// .Where(l => l.Id == userId)
|
||||
// .Where(l => l.Map == mapName);
|
||||
|
||||
// int completions = _db.Laps
|
||||
// .Where(l => l.Map == mapName)
|
||||
// .Count();
|
||||
|
||||
// int position = _db.Database<Laps>.sql("""
|
||||
// SELECT
|
||||
// """);
|
||||
|
||||
// return new LapStorageDTO {
|
||||
// Map = mapName,
|
||||
// Laps = laps,
|
||||
// public int Completions { get; set; }
|
||||
// public int Position { get; set; }
|
||||
|
||||
// }
|
||||
// }
|
||||
|
||||
[HttpPost()]
|
||||
public async Task<Lap> Post(LapDTO dto) {
|
||||
Lap existing = _db.Laps
|
||||
|
||||
Reference in new issue
Block a user