Adde Teammembers fixed

This commit is contained in:
Maximilian Leopold 2019-05-09 13:46:11 +02:00
parent faa21575a8
commit 5c9b85e577
4 changed files with 4 additions and 28 deletions

View File

@ -1,20 +0,0 @@
<html lang="de">
<head>
<meta charset="UTF-8">
<title>BuGa Lageplan</title>
<script src="/config.js"></script>
<!--get local copy of openlayers javascript file-->
<script src="/scripts/ol.js"></script>
<!--get openlayers support javascript file-->
<script src="/scripts/mapScript.js"></script>
<link rel="stylesheet" href="/stylesheets/map.css">
<link rel="stylesheet" href="/stylesheets/style.css">
</head>
<body class="fullscreen">
<div id="map" class="map fullscreen"></div>
<script type="text/javascript">
const map = createMapFromPoiSet([{"Name":"Wolfszipfel_Station1","Latitude":49.14709,"Longitude":9.208993,"CategoryID":0},{"Name":"Live Demo Cache_Station1","Latitude":49,"Longitude":9,"CategoryID":0},{"Name":"GeoCaching für alle_Station1","Latitude":49,"Longitude":9,"CategoryID":0},{"Name":"Test Cache_Station1","Latitude":49.1,"Longitude":9.207,"CategoryID":0},{"Name":"GeoCaching für alle_Station2","Latitude":49,"Longitude":9,"CategoryID":1},{"Name":"GeoCaching für alle_Station3","Latitude":49,"Longitude":9,"CategoryID":1},{"Name":"GeoCaching für alle_Station4","Latitude":49,"Longitude":9,"CategoryID":1},{"Name":"GeoCaching für alle_Station5","Latitude":49,"Longitude":9,"CategoryID":1}]);
</script>
</body>
</html>

View File

@ -1,7 +1,6 @@
package hhn.labsw.bugageocaching.controller; package hhn.labsw.bugageocaching.controller;
import com.google.gson.Gson; import com.google.gson.Gson;
import com.mashape.unirest.http.exceptions.UnirestException;
import hhn.labsw.bugageocaching.entities.*; import hhn.labsw.bugageocaching.entities.*;
import hhn.labsw.bugageocaching.helper.POI; import hhn.labsw.bugageocaching.helper.POI;
import hhn.labsw.bugageocaching.helper.RankingListHelper; import hhn.labsw.bugageocaching.helper.RankingListHelper;

View File

@ -14,14 +14,10 @@ public interface TeamRepository extends JpaRepository<Team, Integer> {
@Query(value = "SELECT *\n" + @Query(value = "SELECT *\n" +
"FROM user\n" + "FROM user\n" +
"WHERE id = (\n" + "WHERE id IN (\n" +
" SELECT user_id\n" + " SELECT user_id\n" +
" FROM user_info\n" + " FROM user_info\n" +
" WHERE team_id = (SELECT team_id\n" + " WHERE team_id = (SELECT team_id FROM team WHERE name = ?1))", nativeQuery = true)
" FROM team\n" +
" WHERE name = ?1\n" +
" )\n" +
")", nativeQuery = true)
List<Object[]> getTeammembers(String name); List<Object[]> getTeammembers(String name);

View File

@ -184,7 +184,8 @@ public class FinderUtil {
sendBack.add(tmp); sendBack.add(tmp);
} }
return ResponseEntity.status(200).body(sendBack);
return ResponseEntity.status(200).body(list);
} else { } else {
return ResponseEntity.status(404).body("Couldnt find Team member of Team " + name); return ResponseEntity.status(404).body("Couldnt find Team member of Team " + name);
} }