fixed the bugs that get all the team instead of the users ones + format
continuous-integration/drone/push Build is passing Details

pull/92/head
Maël DAIM 1 year ago
parent 0aa7ad6ba2
commit fc25ddff4c

@ -32,7 +32,7 @@ import { CourtAction } from "./editor/CourtAction"
import { BasketCourt } from "../components/editor/BasketCourt"
import { ratioWithinBase } from "../components/arrows/Pos"
import { Action, ActionKind } from "../model/tactic/Action"
import {BASE} from "../Constants";
import { BASE } from "../Constants"
const ERROR_STYLE: CSSProperties = {
borderColor: "red",
@ -399,7 +399,7 @@ function EditorView({
Home
</button>
<div id="topbar-left">
<SavingState state={saveState}/>
<SavingState state={saveState} />
</div>
<div id="title-input-div">
<TitleInput

@ -1,8 +1,8 @@
import "../style/home/home.css"
// import AccountSvg from "../assets/account.svg?react"
import {Header} from "./template/Header"
import {BASE} from "../Constants";
import { Header } from "./template/Header"
import { BASE } from "../Constants"
interface Tactic {
id: number

@ -1,4 +1,4 @@
import {BASE} from "../../Constants";
import { BASE } from "../../Constants"
/**
*

@ -123,13 +123,19 @@ class TeamGateway {
);
}
/**
* Get all the user's teams
* @param integer $user
* @return array<array<string, mixed>>
* @param int $user
* @return array<string, mixed>
*/
public function getAll(int $user): array {
return $this->con->fetch("SELECT * FROM Team", []);
return $this->con->fetch(
"SELECT t.* FROM team t,Member m WHERE m.id_team = t.id AND m.id_user= :idUser ",
[
"idUser" => [$user, PDO::PARAM_INT],
]
);
}
}

Loading…
Cancel
Save