Page MenuHomePhabricator

[services] implement getUserID rpc
ClosedPublic

Authored by varun on Jul 27 2022, 2:52 PM.
Tags
None
Referenced Files
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
Unknown Object (File)
Sun, Oct 27, 6:19 PM
Unknown Object (File)
Sun, Oct 27, 6:16 PM
Unknown Object (File)
Fri, Oct 25, 4:47 AM

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.