Standardize all Bruno environment variables to use snake_case convention
(aligned with Go naming practices) and remove duplicate camelCase variants.
Changes:
- Environment file cleanup:
- Remove: baseUrl, ebookid, fakebookid, libraryId, mediaItemId, isVisible, refreshToken
- Standardize: fakebookid → fake_book_id, isVisible → is_visible, refreshToken → refresh_token
- All variables now use consistent snake_case format
- Update all Bruno requests to use standardized variables:
- ebooks: {{ebookid}} → {{ebook_id}}
- library: {{libraryId}} → {{library_id}}
- media-items: {{mediaItemId}} → {{media_item_id}}
- visibility: {{isVisible}} → {{is_visible}}
- auth: {{refreshToken}} → {{refresh_token}}
Benefits:
- Single source of truth for each variable
- Consistent with Go naming conventions
- No ambiguity about which variable name to use
- Cleaner, more maintainable codebase
86 lines
2.0 KiB
Plaintext
86 lines
2.0 KiB
Plaintext
{
|
|
"meta": {
|
|
"name": "Logout User",
|
|
"type": "http",
|
|
"seq": 1,
|
|
"auth": "Inherit"
|
|
},
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{
|
|
"name": "Content-Type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": {
|
|
"type": "json",
|
|
"json": {
|
|
"refresh_token": "{{refresh_token}}"
|
|
}
|
|
},
|
|
"url": {
|
|
"raw": "{{base_url}}/api/auth/logout",
|
|
"host": ["{{base_url}}"],
|
|
"path": ["api", "auth", "logout"]
|
|
},
|
|
"description": "Logs out the user by revoking their refresh token. If no refresh token is provided, the request succeeds but no token is revoked."
|
|
},
|
|
"response": [
|
|
{
|
|
"name": "Success Response",
|
|
"originalRequest": {
|
|
"method": "POST",
|
|
"header": [],
|
|
"body": {
|
|
"type": "json",
|
|
"json": {
|
|
"refresh_token": "valid-refresh-token-uuid"
|
|
}
|
|
},
|
|
"url": {
|
|
"raw": "{{base_url}}/api/auth/logout",
|
|
"host": ["{{base_url}}"],
|
|
"path": ["api", "auth", "logout"]
|
|
}
|
|
},
|
|
"status": 200,
|
|
"code": 200,
|
|
"header": [
|
|
{
|
|
"name": "content-type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": "{\n \"message\": \"logged out successfully\"\n}",
|
|
"description": "Successfully logged out and refresh token revoked."
|
|
},
|
|
{
|
|
"name": "Logout Without Refresh Token",
|
|
"originalRequest": {
|
|
"method": "POST",
|
|
"header": [],
|
|
"body": {
|
|
"type": "json",
|
|
"json": {}
|
|
},
|
|
"url": {
|
|
"raw": "{{base_url}}/api/auth/logout",
|
|
"host": ["{{base_url}}"],
|
|
"path": ["api", "auth", "logout"]
|
|
}
|
|
},
|
|
"status": 200,
|
|
"code": 200,
|
|
"header": [
|
|
{
|
|
"name": "content-type",
|
|
"value": "application/json"
|
|
}
|
|
],
|
|
"body": "{\n \"message\": \"logged out successfully\"\n}",
|
|
"description": "Logout succeeds even without a refresh token."
|
|
}
|
|
]
|
|
}
|