mirror of
https://github.com/Viren070/AIOStreams.git
synced 2025-12-01 23:14:04 +01:00
This commit is contained in:
@@ -75,7 +75,7 @@ export class UserConfigAPI {
|
||||
): Promise<ApiResponse<CreateUserResponse>> {
|
||||
try {
|
||||
const response = await fetch(`${this.BASE_URL}/user`, {
|
||||
method: 'PUT',
|
||||
method: 'POST',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
@@ -125,7 +125,7 @@ export class UserConfigAPI {
|
||||
): Promise<ApiResponse<void>> {
|
||||
try {
|
||||
const response = await fetch(`${this.BASE_URL}/user`, {
|
||||
method: 'POST',
|
||||
method: 'PUT',
|
||||
headers: {
|
||||
'Content-Type': 'application/json',
|
||||
},
|
||||
|
||||
@@ -105,7 +105,7 @@ router.get('/', async (req, res, next) => {
|
||||
});
|
||||
|
||||
// new user creation
|
||||
router.put('/', async (req, res, next) => {
|
||||
router.post('/', async (req, res, next) => {
|
||||
const { config, password } = req.body;
|
||||
if (!config || !password) {
|
||||
next(
|
||||
@@ -143,7 +143,7 @@ router.put('/', async (req, res, next) => {
|
||||
});
|
||||
|
||||
// updating user details
|
||||
router.post('/', async (req, res, next) => {
|
||||
router.put('/', async (req, res, next) => {
|
||||
const { uuid, password, config } = req.body;
|
||||
if (!uuid || !password || !config) {
|
||||
next(
|
||||
|
||||
Reference in New Issue
Block a user