Skip to content

Commit

Permalink
feat: remove read location
Browse files Browse the repository at this point in the history
  • Loading branch information
MurielParaire committed Jun 18, 2024
1 parent 34aeae3 commit 5f6837b
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion api/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def getWord():
@app.route("/persons")
def getAllPersons():
try:
cur.execute("SELECT * FROM person")
cur.execute("SELECT last_name, phone_number FROM person")
persons = cur.fetchall()
except Exception as err:
return str(err), 500
Expand Down
2 changes: 1 addition & 1 deletion infra/database/data/init.psql
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ CREATE TABLE person (
id SERIAL NOT NULL PRIMARY KEY,
last_name TEXT NOT NULL,
phone_number TEXT NOT NULL,
location TEXT NOT NULL
location TEXT
);

INSERT INTO person
Expand Down
2 changes: 0 additions & 2 deletions web/src/components/ListPersons.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,12 @@ export default {
<tr>
<th>Last name</th>
<th>Phone number</th>
<th>Location</th>
</tr>
</thead>
<tbody>
<tr v-for="person in this.personList" :key="person.id">
<td>{{ person[0] }}</td>
<td>{{ person[1] }}</td>
<td>{{ person[2] }}</td>
</tr>
</tbody>
</table>
Expand Down

0 comments on commit 5f6837b

Please sign in to comment.