43 lines
1.0 KiB
HTTP
43 lines
1.0 KiB
HTTP
### User Register
|
|
POST {{host}}/api/auth/register
|
|
Content-Type: application/json
|
|
|
|
{
|
|
"firstName": "Admin",
|
|
"lastName": "Admin",
|
|
"email": "admin@admin.at",
|
|
"password": "SuperAdmin",
|
|
"atNumber": "AT0010000000000000000000001234567"
|
|
}
|
|
|
|
### User Login
|
|
POST {{host}}/api/auth/login
|
|
Content-Type: application/json
|
|
|
|
{
|
|
"email": "admin@admin.at",
|
|
"password": "SuperAdmin"
|
|
}
|
|
|
|
> {%
|
|
client.global.set("auth_token", response.body.token);
|
|
%}
|
|
|
|
### Admin User Pending
|
|
GET {{host}}/api/admin/users/pending
|
|
Content-Type: application/json
|
|
Authorization: Bearer {{auth_token}}
|
|
|
|
> {%
|
|
if (response.status === 200 && response.body.length > 0) {
|
|
client.global.set("pending_user_id", response.body[0].id);
|
|
client.log("Gespeicherte User ID: " + client.global.get("pending_user_id"));
|
|
} else {
|
|
client.log("Keine Pending Users gefunden oder Fehler beim Abruf.");
|
|
}
|
|
%}
|
|
|
|
### Admin User Approve
|
|
POST {{host}}/api/admin/users/{{pending_user_id}}/approve
|
|
Content-Type: application/json
|
|
Authorization: Bearer {{auth_token}} |