peppermint icon indicating copy to clipboard operation
peppermint copied to clipboard

Internal Users Delete is not working!!!

Open SlymnGkky opened this issue 1 year ago • 2 comments

Hello, I can create users in the Internal Users section. However, when I want to delete it, I get the following error. What causes the problem? Error

SlymnGkky avatar Jan 19 '24 13:01 SlymnGkky

I have the same exact Error. This is the Log if i try to delete a User:

2024/01/21 08:55PM 30 pid=23 hostname=77fdc00f21dd reqId=req-17 res={"statusCode":200} responseTime=105.20653599500656 msg=request completed
2024/01/21 08:55PM 30 pid=23 hostname=77fdc00f21dd reqId=req-15 res={"statusCode":200} responseTime=124.52514401078224 msg=request completed
2024/01/21 08:55PM 30 pid=23 hostname=77fdc00f21dd reqId=req-18 res={"statusCode":200} responseTime=120.67421001195908 msg=request completed
2024/01/21 08:55PM 30 pid=23 hostname=77fdc00f21dd reqId=req-19 req={"method":"GET","url":"/api/v1/users/all","hostname":"127.0.0.1:5003","remoteAddress":"127.0.0.1","remotePort":59630} msg=incoming request
2024/01/21 08:55PM 30 pid=23 hostname=77fdc00f21dd reqId=req-19 res={"statusCode":200} responseTime=3.739051014184952 msg=request completed
2024/01/21 08:55PM 30 pid=23 hostname=77fdc00f21dd reqId=req-1a req={"method":"DELETE","url":"/api/v1/auth/user/49deba94-92a2-4247-ae95-c2c84d4ece55","hostname":"127.0.0.1:5003","remoteAddress":"127.0.0.1","remotePort":36458} msg=incoming request
2024/01/21 08:55PM 30 pid=23 hostname=77fdc00f21dd reqId=req-1a res={"statusCode":400} err={"type":"FastifyError","message":"Body cannot be empty when content-type is set to 'application/json'","stack":"FastifyError: Body cannot be empty when content-type is set to 'application/json'\n    at Parser.defaultJsonParser [as fn] (/apps/api/node_modules/fastify/lib/contentTypeParser.js:288:19)\n    at IncomingMessage.onEnd (/apps/api/node_modules/fastify/lib/contentTypeParser.js:276:27)\n    at IncomingMessage.emit (node:events:514:28)\n    at endReadableNT (node:internal/streams/readable:1589:12)\n    at process.processTicksAndRejections (node:internal/process/task_queues:82:21)","code":"FST_ERR_CTP_EMPTY_JSON_BODY","name":"FastifyError","statusCode":400} msg=Body cannot be empty when content-type is set to 'application/json'
2024/01/21 08:55PM 30 pid=23 hostname=77fdc00f21dd reqId=req-1a res={"statusCode":400} responseTime=0.6534959971904755 msg=request completed
2024/01/21 08:55PM 30 pid=23 hostname=77fdc00f21dd reqId=req-1b req={"method":"GET","url":"/api/v1/users/all","hostname":"127.0.0.1:5003","remoteAddress":"127.0.0.1","remotePort":36464} msg=incoming request
2024/01/21 08:55PM 30 pid=23 hostname=77fdc00f21dd reqId=req-1b res={"statusCode":200} responseTime=2.7397359907627106 msg=request completed
2024/01/21 08:55PM 30 pid=23 hostname=77fdc00f21dd reqId=req-1c req={"method":"GET","url":"/api/v1/users/all","hostname":"127.0.0.1:5003","remoteAddress":"127.0.0.1","remotePort":36470} msg=incoming request
2024/01/21 08:55PM 30 pid=23 hostname=77fdc00f21dd reqId=req-1c res={"statusCode":200} responseTime=2.8934810161590576 msg=request completed

Also if i change the password of a User, i don't get an Error, but the Password has'nt been changed. Screenshot 2024-01-21 205935 So if i want to Login with the new Password i get an Error, but the Password i set in the beginning still works. Screenshot 2024-01-21 210012

MrFlathill avatar Jan 21 '24 20:01 MrFlathill

will look at this tonight

potts99 avatar Feb 29 '24 13:02 potts99

apologies for delay @MrFlathill now resolved in latest version

potts99 avatar Mar 21 '24 12:03 potts99

i have 0.4.5 version and still cannot delete http://x.x.x.x/api/v1/clients/4e7d1388-3d09-4f17-af24-12b6f0813433/delete-client { "statusCode": 400, "code": "FST_ERR_CTP_EMPTY_JSON_BODY", "error": "Bad Request", "message": "Body cannot be empty when content-type is set to 'application/json'" }

DeDuplicate avatar Mar 25 '24 23:03 DeDuplicate

resolved @DeDuplicate

potts99 avatar Mar 26 '24 01:03 potts99

I'm on 0.4.6 and I don't see a delete button beside the users

tarasis avatar Mar 29 '24 10:03 tarasis

You can only delete non admins @tarasis

potts99 avatar Mar 29 '24 11:03 potts99

You can only delete non admins @tarasis

Ah. Cheers. Thats not ideal, particularly as the reset password beside the particular admin user, seems to reset the password for [email protected] rather than the one I want ... so I can't login with the other admin user I created, and I can't said admin user.

tarasis avatar Mar 29 '24 13:03 tarasis

will look into this now @tarasis

potts99 avatar Mar 29 '24 15:03 potts99