From 31d5bf195a436715410b207a2eb81300c0e171a6 Mon Sep 17 00:00:00 2001 From: "dmit.b" Date: Fri, 8 May 2026 13:48:53 +0300 Subject: [PATCH] Remove POST /geo, replaced by /share --- bin/routes/geo_routes.dart | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/bin/routes/geo_routes.dart b/bin/routes/geo_routes.dart index cb12b91..de47fbe 100644 --- a/bin/routes/geo_routes.dart +++ b/bin/routes/geo_routes.dart @@ -11,23 +11,11 @@ class GeoRoutes { Router get routes { final router = Router(); - router.post('/geo', AuthMiddleware(_createPosition).call); router.put('/geo', AuthMiddleware(_updatePosition).call); router.post('/share', AuthMiddleware(_createShare).call); return router; } - Future _createPosition(Request request) async { - final body = await request.readAsString(); - final data = jsonDecode(body); - - final x = data['x']; - final y = data['y']; - - final position = await database.createPosition(x, y); - return Response(201, body: position.toJson()); - } - Future _updatePosition(Request request) async { final id = int.parse(request.url.queryParameters['id']!); final body = await request.readAsString();