Commit ec28d490 authored by Sofia Aicha Delijaj's avatar Sofia Aicha Delijaj
Browse files

friends fixed

parent c0e4f6dd
......@@ -68,7 +68,7 @@ Joueur.addAmi = (pseudo, ami, result) => {
};
Joueur.accept = (pseudo, ami, result) => {
sql.query("UPDATE ami SET accept = 1 WHERE id_joueur1 = ? AND id_joueur2 = ?", [pseudo, ami], (err, res) => {
sql.query("UPDATE ami SET accept = 1 WHERE id_joueur1 = ? AND id_joueur2 = ?", [ami, pseudo], (err, res) => {
if (err) {
console.log("error: ", err);
result(err, null);
......
......@@ -110,6 +110,7 @@ export class FriendsMenuComponent implements OnInit {
this.pseudo = res.body;
this.uid = res.uid;
this.liste();
this.ordre();
});
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment