Amjad Alsharafi Amjad50
Amjad50 commented on pull request OxideTalis/oxidetalis#33 2024-07-28 11:20:18 +02:00
refactor: Use PublicKey and Signature as parameters

but my idea was also removing all of these calls and instead just using it in the arguments.

Middlewares cannot return a response; they can only modify it. As you can see, the response…

Amjad50 commented on pull request OxideTalis/oxidetalis#33 2024-07-28 10:36:15 +02:00
refactor: Use PublicKey and Signature as parameters

This is good, but my idea was also removing all of these calls and instead just using it in the arguments.

#[handler]
pub async fn signature_check(
    req: &mut Request,
    res:
Amjad50 commented on pull request OxideTalis/oxidetalis#33 2024-07-27 12:21:16 +02:00
refactor: Use PublicKey and Signature as parameters

you can fix the link to the salvo issue in the PR description ...regarding this matter [here][issue1].

Beside that, this is okay. though I notice that in signature_check middleware, we…

Amjad50 commented on pull request OxideTalis/oxidetalis#29 2024-07-23 08:51:11 +02:00
refactor: Update public key column type from String to PublicKey

Ah right, didn't notice that

Amjad50 commented on pull request OxideTalis/oxidetalis#29 2024-07-23 05:07:38 +02:00
refactor: Update public key column type from String to PublicKey

replace map by and_then and you won't need `and_then(

Amjad50 commented on pull request OxideTalis/oxidetalis#29 2024-07-23 05:07:38 +02:00
refactor: Update public key column type from String to PublicKey

same as above, and_then instead of map

Amjad50 commented on pull request OxideTalis/oxidetalis#29 2024-07-23 05:07:38 +02:00
refactor: Update public key column type from String to PublicKey

Wouldn't it be better to use Bytes type? easier to convert as its just copying bytes and making sure its the length expected and maybe more efficient

Amjad50 commented on pull request OxideTalis/oxidetalis#29 2024-07-23 05:07:38 +02:00
refactor: Update public key column type from String to PublicKey

Why is it here CorePublicKey? while in oxidetails crate is just PublicKey, I think it might be confusing as we would think its 2 types.

Amjad50 approved OxideTalis/oxidetalis#14 2024-07-18 13:16:23 +02:00
feat: Chat request implementation

Nice

Amjad50 commented on pull request OxideTalis/oxidetalis#14 2024-07-18 10:01:56 +02:00
feat: Chat request implementation

you can use get_user_status here and also is_blacklisted

Amjad50 commented on pull request OxideTalis/oxidetalis#14 2024-07-18 09:46:34 +02:00
feat: Chat request implementation

small nitpick (also applies to have_chat_request_to below) I would name it get_chat_request_to, as have seems that it would be boolean

Amjad50 commented on pull request OxideTalis/oxidetalis#14 2024-07-17 09:29:52 +02:00
feat: Chat request implementation

yah, if you want to add it, I think we can do in this PR, just change the whitelist table (or if we are merging both, it will be a special column for blacklist)

So we can either remove it or…

Amjad50 commented on pull request OxideTalis/oxidetalis#14 2024-07-17 04:09:29 +02:00
feat: Chat request implementation

We can add EndpointArgRegister implementation and thus we can use it in the arg directly