为什么我的axios发布请求出现404错误? (猫鼬DeleteOne)

时间:2019-04-19 21:12:14

标签: mongodb vue.js mongoose axios

我正在尝试创建一个函数,该函数从MongoDB的<div>集合中删除待办事项列表。我正在使用axios和猫鼬来实现这一目标。 发布请求采用待办事项列表的<div>,然后找到有问题的待办事项列表,如果找到待办事项列表,则将其删除。这是路线声明和发布请求。我正在使用Vue和Webpack进行此操作(以防万一您想知道为什么语法看起来很特别)。

html {
  height: 100%;
}
body {
  display: block;
  text-align: center;
  height: 100%;
  min-height: 100%;
  position: relative;
  padding: 0;
  margin: 0;
}
.top {
  display: block;
  background-image: url(photo-top.jpg);
  background-position: 50%;
  background-size: cover;
  height:100%;
  min-height: 100%;
  width:100%;
  top: 0;
  margin: 0;
  padding: 0;
}
.bottom {
  display: block;
  background-image: url(photo-bottom.jpg);
  background-position: 50%;
  background-size: cover;
  height:100%;
  min-height: 100%;
  width:100%;
  bottom: 0;
  margin: 0;
  padding: 0;
}

发出发布请求的函数:

<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
  </head>
  <body>
    <div class="top"></div>
    <div class="bottom"></div>
  </body>
</html>

这是我得到的错误:

todolists

该错误引用了发布请求中的catch语句。

0 个答案:

没有答案
相关问题