Skip to content

Your perfect playground to practice CRUD operations in a safe, simulated e-wallet environment without the risk of real currency.

Notifications You must be signed in to change notification settings

joinsigma/slap-n-go-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 

Repository files navigation

Slap 'n Go API

Your perfect playground to practice CRUD operations in a safe, simulated e-wallet environment without the risk of real currency.

DELETE /deleteUser/:username

Delete a specific user identified by the username parameter.

HTTP DELETE Request

https://e-wallet-api-server.sigma-schoolsc1.repl.co/users/:username
Parameters, Success and Error responses

URL Parameters

Parameter Description
username The username of the user to be deleted.

Success Response

Status 200

Response content:

{
  "message": "User {username} has been deleted."
}

Error Responses

Status 403 Response content:
{
  "message": "Invalid API key."
}
Status 404 Response content:
{
  "message": "User {username} not found."
}

DELETE /deleteTransaction/:username

Delete a specific transaction for a user identified by the username parameter.

HTTP Delete Transaction Request

https://e-wallet-api-server.sigma-schoolsc1.repl.co/deleteTransaction/:username

Request Body

The request body must be a JSON object containing the amount property. For example:

{
  "amount": 10
}
Parameters, Success and Error Responses

URL Parameters

Parameter Description
username The username of the user to be deleted.

Success Response

Status 200 Response content:
{
  "message": "Transaction for user {username} has been deleted successfully!",
  "name": "{username}",
  "transactions": []
}

Error Responses

Status 418 Response content:
{
 "error": "Error Transaction Request: 'amount' is required in request body."
}

About

Your perfect playground to practice CRUD operations in a safe, simulated e-wallet environment without the risk of real currency.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published