Page MenuHomePhabricator

[services] implement getUserID rpc
ClosedPublic

Authored by varun on Jul 27 2022, 2:52 PM.
Tags
None
Referenced Files
F3351969: D4658.diff
Sat, Nov 23, 4:15 AM
Unknown Object (File)
Sat, Nov 16, 12:11 PM
Unknown Object (File)
Sat, Nov 16, 10:11 AM
Unknown Object (File)
Sun, Nov 10, 12:40 AM
Unknown Object (File)
Tue, Nov 5, 9:56 PM
Unknown Object (File)
Tue, Nov 5, 9:39 PM
Unknown Object (File)
Sun, Oct 27, 6:19 PM
Unknown Object (File)
Sun, Oct 27, 6:19 PM

Details

Summary

This RPC lets a client get a user ID corresponding to a given wallet address or username.

Depends on D4657

Test Plan

Ran the service and called the RPC, retrieved the correct user ID from DynamoDB with a wallet address and a username

Diff Detail

Repository
rCOMM Comm
Branch
identity (branched from master)
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

varun requested review of this revision.Jul 27 2022, 3:05 PM
tomek added inline comments.
services/identity/src/service.rs
360

Wondering if we should log this request. Can it contain sensitive data?

380–391

This code is duplicated. Is there a way to extract common logic from it?

This revision is now accepted and ready to land.Jul 28 2022, 3:00 AM
services/identity/src/service.rs
360

We should avoid logging things like user IDs

360
services/identity/src/service.rs
360

ok, will remove this and similar logs

380–391

yeah we can have a function that handles matching errors, i'll try to implement that

avoid duplicating DBError arms in match statements

This revision was landed with ongoing or failed builds.Jul 28 2022, 12:49 PM
This revision was automatically updated to reflect the committed changes.