mirror of
https://github.com/Wessel/Roommapper.git
synced 2026-07-19 22:44:09 +02:00
fix: Meer fixes
This commit is contained in:
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
0
src/Server/LibParse/bin/Debug/net8.0/LibParse.deps.json
Executable file → Normal file
0
src/Server/LibParse/bin/Debug/net8.0/LibParse.deps.json
Executable file → Normal file
Binary file not shown.
Binary file not shown.
0
src/Server/LibServer/bin/Debug/net8.0/LibServer.deps.json
Executable file → Normal file
0
src/Server/LibServer/bin/Debug/net8.0/LibServer.deps.json
Executable file → Normal file
Binary file not shown.
Binary file not shown.
@@ -1,36 +0,0 @@
|
||||
{
|
||||
"runtimeTarget": {
|
||||
"name": ".NETCoreApp,Version=v8.0",
|
||||
"signature": ""
|
||||
},
|
||||
"compilationOptions": {},
|
||||
"targets": {
|
||||
".NETCoreApp,Version=v8.0": {
|
||||
"LibServer/1.0.0": {
|
||||
"dependencies": {
|
||||
"LibHttp": "1.0.0"
|
||||
},
|
||||
"runtime": {
|
||||
"LibServer.dll": {}
|
||||
}
|
||||
},
|
||||
"LibHttp/1.0.0": {
|
||||
"runtime": {
|
||||
"LibHttp.dll": {}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"libraries": {
|
||||
"LibServer/1.0.0": {
|
||||
"type": "project",
|
||||
"serviceable": false,
|
||||
"sha512": ""
|
||||
},
|
||||
"LibHttp/1.0.0": {
|
||||
"type": "project",
|
||||
"serviceable": false,
|
||||
"sha512": ""
|
||||
}
|
||||
}
|
||||
}
|
||||
Binary file not shown.
Binary file not shown.
@@ -2,8 +2,6 @@ using Cassandra;
|
||||
using LibParse.Json;
|
||||
using LibServer.Http;
|
||||
using LibServer.Router;
|
||||
using Newtonsoft.Json;
|
||||
using RobotControlServer.JsonClasses;
|
||||
using System.Drawing;
|
||||
|
||||
namespace RobotControlServer.Routes;
|
||||
@@ -17,8 +15,7 @@ public class RoutePlan(ISession cassandraSession): IRoute {
|
||||
try {
|
||||
// Parse request body to Data object, give error if non-nullable fields
|
||||
// are null.
|
||||
string id;
|
||||
var parsedBody = request.Body?.FromJson<Data>();
|
||||
string? id;
|
||||
if (!request.QueryString.TryGetValue("id", out id)) {
|
||||
throw new Exception("id is null");
|
||||
}
|
||||
@@ -41,8 +38,7 @@ public class RoutePlan(ISession cassandraSession): IRoute {
|
||||
List<Point> obstacles = new List<Point>();
|
||||
|
||||
// Add obstacle cells
|
||||
foreach (var obj in $"[{map.GetValue<string>("objects")}]".FromJson<int[][]>()) // $"[{parsedBody?.objects}]".FromJson<int[][]>()
|
||||
{
|
||||
foreach (var obj in $"[{map.GetValue<string>("objects")}]".FromJson<int[][]>()) {
|
||||
obstacles.Add(new Point(obj[0], obj[1])); // Get x and y for every coordinate in the parsedbody array
|
||||
}
|
||||
|
||||
|
||||
@@ -82,7 +82,8 @@ export default class MapCanvas extends React.Component {
|
||||
return;
|
||||
}
|
||||
|
||||
if (route || route.points.length > 0) {
|
||||
console.log(route);
|
||||
if (route && route.points.length > 0) {
|
||||
ctx.fillStyle = "#800000";
|
||||
route.points.forEach(point => {
|
||||
ctx.beginPath();
|
||||
@@ -104,8 +105,7 @@ export default class MapCanvas extends React.Component {
|
||||
async HandlePlan() {
|
||||
if (this.state.currentMap.length < 1) return;
|
||||
const url = `${API_ENDPOINT}/database/path/plan?id=${this.state.currentMapId}`;
|
||||
const data = await (await fetch(url)).json();
|
||||
console.log(data);
|
||||
await await fetch(url);
|
||||
}
|
||||
|
||||
render() {
|
||||
|
||||
Reference in New Issue
Block a user