【发布时间】:2019-06-02 11:58:56
【问题描述】:
我正在构建一个 Node.js PostgresSQL 服务器,从中获取我的数据,然后我想在我的 Vue 客户端中显示它们。现在我被困在从我的客户中删除列。当我尝试删除它时,我收到此错误。 https://imgur.com/6fiBrUc
我已经尝试通过粘贴链接 http://localhost:3000/buch/del/9781201600312 来测试我的路线,它成功了,它从我的数据库中删除了该列,所以我认为路线正在运行,但我的客户有问题
我的 Axios 通话:
async delSpalte(isbn){
await axios({
url:"http://localhost:3000/buch/del/" + isbn,
method: "delete"
});
}
我把我的数据放在这个表中:
<tr v-for="x in books">
<th @click="CurrClickedTitle = x.titel; getAnzahlBuecher(x.isbn)">
{{x.titel}}</th>
<td>{{x.isbn}}</td>
<td>{{x.erscheinungsdatum}}</td>
<td>{{x.preis}}</td>
<td><button @click="delSpalte(x.isbn); getBuecher();" class="btn btn-danger">Löschen</button></td>
【问题讨论】:
标签: javascript node.js postgresql vue.js axios