Page MenuHomePhabricator

[services] implement getUserID rpc
ClosedPublic

Authored by varun on Jul 27 2022, 2:52 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Sep 24, 9:18 PM
Unknown Object (File)
Tue, Sep 24, 9:18 PM
Unknown Object (File)
Tue, Sep 24, 9:18 PM
Unknown Object (File)
Tue, Sep 24, 9:18 PM
Unknown Object (File)
Tue, Sep 24, 9:17 PM
Unknown Object (File)
Sat, Sep 21, 9:01 PM
Unknown Object (File)
Fri, Sep 20, 2:46 AM
Unknown Object (File)
Tue, Sep 10, 7:44 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
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

varun requested review of this revision.Jul 27 2022, 3:05 PM
tomek added inline comments.
services/identity/src/service.rs
360 ↗(On Diff #15028)

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

380–391 ↗(On Diff #15028)

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 ↗(On Diff #15028)

We should avoid logging things like user IDs

360 ↗(On Diff #15028)
services/identity/src/service.rs
360 ↗(On Diff #15028)

ok, will remove this and similar logs

380–391 ↗(On Diff #15028)

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.