diff --git a/bluenps/src/app/home-page/home-page.component.html b/bluenps/src/app/home-page/home-page.component.html
index 91bd91a..3d2b1ec 100644
--- a/bluenps/src/app/home-page/home-page.component.html
+++ b/bluenps/src/app/home-page/home-page.component.html
@@ -20,11 +20,12 @@
-
+
{{player.name}}
{{player.time}}
{{player.court}}
+
diff --git a/bluenps/src/app/home-page/home-page.component.ts b/bluenps/src/app/home-page/home-page.component.ts
index 802e633..56dd3bf 100644
--- a/bluenps/src/app/home-page/home-page.component.ts
+++ b/bluenps/src/app/home-page/home-page.component.ts
@@ -45,5 +45,13 @@ export class HomePageComponent implements OnInit {
)
this.refreshData();
}
+ deletePlayer(player: signup): void{
+ this.backendService.deleteData(player.name).subscribe(
+ {
+ next: (value) => {this.refreshData();},
+ error: (e) => {console.log("errordeleting:", e);this.refreshData();}
+ }
+ )
+ }
}
diff --git a/bluenpsbackend/court/__pycache__/views.cpython-312.pyc b/bluenpsbackend/court/__pycache__/views.cpython-312.pyc
index fbf7305..7f8c562 100644
Binary files a/bluenpsbackend/court/__pycache__/views.cpython-312.pyc and b/bluenpsbackend/court/__pycache__/views.cpython-312.pyc differ
diff --git a/bluenpsbackend/court/views.py b/bluenpsbackend/court/views.py
index 7f26764..a103204 100644
--- a/bluenpsbackend/court/views.py
+++ b/bluenpsbackend/court/views.py
@@ -51,10 +51,10 @@ def deleteToday(request):
return badRequest()
nameQuery = request.headers["nameQuery"]
+ fullQuery = f"^{nameQuery}$"
todayData = CourtPresence.objects.filter(
time=datetime.today(),
- name__regex= nameQuery
- )
+ ).filter(name__regex= f"{fullQuery}")
dataCopy = list(todayData.values())
todayData.delete()
r = JsonResponse(dataCopy, safe=False)
diff --git a/bluenpsbackend/db.sqlite3 b/bluenpsbackend/db.sqlite3
index 85f7ee3..70fb1aa 100644
Binary files a/bluenpsbackend/db.sqlite3 and b/bluenpsbackend/db.sqlite3 differ