Skip to content

nam7v3/baget_server

Repository files navigation

baget_server

Baget synchronize server written in rust, actix-web and diesel with jwt authentication

Dependencies

API

POST /auth/register

  • Body:
{
  "username": "nam7v3",
  "password": "nam7v3",
}
  • Response:
{
  "status": "success" // "fail"
}

POST /auth/login

  • Body:
{
  "username": "nam7v3",
  "password": "nam7v3"
}
  • Response:
{
  "status": "success", // "fail"
  "token": "<TOKEN>" // "message": "..."
}

GET /sync

  • Header:
    Authorization: Bearer <TOKEN>
    
  • Response:
{
  "status": "success", // "fail"
  "data": [
    "transactions": [
      {
          "transaction_id": 1,
          "entry_date": "Saturday",
          "amount": 32.0,
          "account": "account",
          "category": "category",
          "transaction_type": "type",
          "transaction_title": "title"
      }
      // ...
    ],
    "expenses": [
      {
        "expense_id": 1,
        "entry_date": "Saturday",
        "amount": 30.0,
        "expense": "expense",
      }
      // ...
    ]
  ]
}

POST /sync

  • Header:
    Authorization: Bearer <TOKEN>
    
  • Body
{
  "transactions": [
    {
        "entry_date": "Saturday",
        "amount": 32.0,
        "account": "account",
        "category": "category",
        "transaction_type": "type",
        "transaction_title": "title"
    }
    // ...
  ],
  "expenses": [
    {
      "entry_date": "Saturday",
      "amount": 30.0,
      "expense": "expense",
    }
    // ...
  ]
}

About

Baget Synchronize Server

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published