Commit graph

8 commits

Author SHA1 Message Date
20a8ac6715
refactor: Use PublicKey and Signature as parameters
All checks were successful
Write changelog / write-changelog (push) Successful in 4s
Update Contributors / Update Contributors (push) Successful in 4s
Rust CI / Rust CI (push) Successful in 5m24s
### Changes
- Implement `salvo_oapi::Extractible` and `salvo_oapi::EndpointArgRegister`
for `PublicKey`
- Implement `salvo_oapi::Extractible` and `salvo_oapi::ToParameters` for `Signature`

### Notes
I did not implement `salvo_oapi::ToParameters` for `PublicKey` because it will
not be used as an OpenAPI parameter. Instead, Salvo will register it using the
`EndpointArgRegister` trait.

Similarly, I did not implement `salvo_oapi::EndpointArgRegister` for `Signature`
because it will not be used as an argument in the endpoint. Instead, the
signature will be verified by the signature middleware, and we will only use it
as a parameter.

Reviewed-by: Amjad Alsharafi <me@amjad.alsharafi.dev>
Reviewed-on: #33
Fixes: #21
Helped-by: Amjad Alsharafi <me@amjad.alsharafi.dev>
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-28 12:56:20 +03:00
1d1bb962bb
refactor: Update public key column type from String to PublicKey
All checks were successful
Write changelog / write-changelog (push) Successful in 4s
Update Contributors / Update Contributors (push) Successful in 5s
Rust CI / Rust CI (push) Successful in 4m29s
Reviewed-on: #29
Reviewed-by: Amjad Alsharafi <me@amjad.alsharafi.dev>
Helped-by: Amjad Alsharafi <me@amjad.alsharafi.dev>
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-24 01:19:34 +03:00
1c273d746b
chore: Add url to oxidetalis_config dependencies
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-23 00:18:39 +03:00
f0d1b78946
change: Add serde & openapi features to the core
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-23 00:18:38 +03:00
8888bf2d60
feat: Chat request implementation
In this patch, I have implemented the chat request and response from OTMP
protocol. The changes include:
- New `in_chat_request` and `out_chat_request` database tables
- New `users_status` table to store user status (whitelisted or blacklisted)
- New server events:
    - `ChatRequest` To send chat request comes from some user
    - `ChatRequestResponse` To send chat request response to some user
- New client events:
    - `ChatRequest` To send chat request to some user
    - `ChatRequestResponse` To send chat request response to some user
- `ws_errors` macro to create websocket errors
- `/user/whitelist` and `/user/blacklist` API to list whitelisted and
blacklisted users

Fixes: #2
Reviewed-on: #14
Reviewed-by: Amjad Alsharafi <me@amjad.alsharafi.dev>
Helped-by: Amjad Alsharafi <me@amjad.alsharafi.dev>
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-23 00:18:36 +03:00
6f43e44745
chore: Add new dependencies for websocket
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-05 02:16:10 +03:00
b8e00c244a
chore: Use rustls instead of native-tls
Signed-off-by: Awiteb <a@4rs.nl>
2024-07-01 11:30:57 +03:00
7e3558d776
chore: Initialize the project
Signed-off-by: Awiteb <a@4rs.nl>
2024-06-26 23:05:17 +03:00