Merge branch 'develop' into frontend/robin
This commit is contained in:
commit
8d3fe823a9
@ -9,7 +9,7 @@ import java.util.List;
|
||||
public interface UserRepository extends CrudRepository<User, Integer> {
|
||||
User findByEmail(String email);
|
||||
|
||||
@Query(value = "SELECT DISTINCT u.id AS ID, SUBSTRING_INDEX(u.email, '@', 1) AS Name, ui.ranking_points_sum AS Ranglistenpunkte\n" +
|
||||
@Query(value = "SELECT DISTINCT u.id AS ID, username AS Name, ui.ranking_points_sum AS Ranglistenpunkte\n" +
|
||||
"FROM user u,\n" +
|
||||
" user_info ui,\n" +
|
||||
" user_roles ur\n" +
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
package hhn.labsw.bugageocaching.util;
|
||||
|
||||
import com.google.gson.Gson;
|
||||
import hhn.labsw.bugageocaching.entities.*;
|
||||
import hhn.labsw.bugageocaching.repositories.*;
|
||||
import io.jsonwebtoken.Claims;
|
||||
@ -181,11 +182,12 @@ public class FinderUtil {
|
||||
list) {
|
||||
User tmp = new User();
|
||||
tmp.setUsername((String) obj[3]);
|
||||
tmp.setEmail((String) obj[1]);
|
||||
sendBack.add(tmp);
|
||||
}
|
||||
|
||||
|
||||
return ResponseEntity.status(200).body(list);
|
||||
return ResponseEntity.status(200).body(new Gson().toJson(sendBack));
|
||||
} else {
|
||||
return ResponseEntity.status(404).body("Couldnt find Team member of Team " + name);
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user