Browse Source

End the "/users/register" request. Removed 'charset=utf-8' from 'Content-Type' as it was causing issues with the request

Cameron Kline 8 năm trước cách đây
mục cha
commit
5bdcb5b05f
2 tập tin đã thay đổi với 2 bổ sung2 xóa
  1. 1 1
      backend/logic/expressHandler.js
  2. 1 1
      frontend/App.vue

+ 1 - 1
backend/logic/expressHandler.js

@@ -12,7 +12,7 @@ module.exports = (core, app) => {
 
 	app.post('/users/register', (req, res) => {
 		core['/users/register'](req.body.username, req.body.email, req.body.password, req.body.recaptcha, result => {
-			res.send(JSON.stringify(result));
+			res.end(JSON.stringify(result));
 		});
 	});
 };

+ 1 - 1
frontend/App.vue

@@ -64,7 +64,7 @@
 					method: 'POST',
 					headers: {
 						'Accept': 'application/json',
-						'Content-Type': 'application/json; charset=utf-8'
+						'Content-Type': 'application/json'
 					},
 					body: JSON.stringify({
 						email: this.login.email,