This commit is contained in:
eson 2023-09-05 17:35:33 +08:00
parent 4342e09699
commit 1d9b70aa18
2 changed files with 3 additions and 7 deletions

View File

@ -117,11 +117,6 @@ button:hover {
</form>
</div>
<div id="messageContainer">
<p id="successMessage" class="message success"></p>
<p id="errorMessage" class="message error"></p>
</div>
<script>
function resetPassword() {
const new_password = document.getElementById("new_password").value;
@ -148,9 +143,9 @@ function resetPassword() {
.then(response => response.json())
.then(data => {
if (data.code == 200 ) {
document.getElementById('successMessage').innerText = JSON.stringify(data);
alert(data.msg);
} else {
document.getElementById('errorMessage').innerText = JSON.stringify(data);
alert(data.msg);
}
})
.catch(error => {

View File

@ -67,6 +67,7 @@ func FinishRegister(svcCtx *svc.ServiceContext, user *gmodel.FsUser, token *auth
}
func CommonNotify(WebsocketAddr, wid string, event *wevent.WebsocketEvent) error {
reqWebsocketAddr := fmt.Sprintf("%s/api/websocket/common_notify", WebsocketAddr)
tp := requests.Post(reqWebsocketAddr)
tp.SetBodyJson(requests.M{