vue.js - 尝试在strapi中忘记密码时出现400错误
问题描述
我正在尝试使用strapi forgot password,并且我在 vue js 中有 frondend。当我尝试发送忘记密码的请求时,它会抛出 400 错误。
<template>
<form @submit.prevent="onForgetPassword">
<label for="name">your email</label>
<input type="email" class="from-input" placeholder="Enter Your Email..." v-model="email"/>
<button type="submit" class="form-btn">reset password</button>
</form>
</template>
data() {
return {
email: ""
};
},
methods: {
onForgetPassword() {
axios
.post("http://localhost:1337/auth/forgot-password", {
email: this.email
})
.then(response => {
// Handle success.
console.log("Your user received an email");
})
.catch(error => {
// Handle error.
console.log("An error occurred:", error);
});
}
}
解决方案
推荐阅读
- java - 究竟是什么导致网格不显示?爪哇摇摆
- database - 如何查找每个 Hsql 数据库表的磁盘使用情况(使用 SQL、DataGrip 或其他解决方案)?
- sql-server - SQL Server 中的大型 USERSTORE_OBJPERM
- linux - 如果通过 cron 执行 perl 系统功能不起作用
- magento - 本地 Windows 机器上的 PWA 设置
- qt - Linux下无法使用QML QtGamepad
- python - selenium 中 webdriver 的调用选项
- sockets - 为什么 systemd 总是重启 udp 服务?
- python - 使用 sklearn 的 PolynomialFeatures 最小度数
- python - 如何使用python将音频缓冲区传递给语音到文本服务