refactor: add pkc fields for registration endpoint (#1680)
This commit is contained in:
@@ -286,7 +286,7 @@ export class SNSessionManager extends AbstractService<SessionEvent> implements S
|
||||
const serverPassword = rootKey.serverPassword as string
|
||||
const keyParams = rootKey.keyParams
|
||||
|
||||
const registerResponse = await this.userApiService.register(email, serverPassword, keyParams, ephemeral)
|
||||
const registerResponse = await this.userApiService.register({ email, serverPassword, keyParams, ephemeral })
|
||||
|
||||
if ('error' in registerResponse.data) {
|
||||
throw new ApiCallError((registerResponse.data as HttpErrorResponseBody).error.message)
|
||||
|
||||
@@ -144,7 +144,11 @@ export async function registerOldUser({ application, email, password, version })
|
||||
const operator = application.protocolService.operatorManager.operatorForVersion(version)
|
||||
const accountKey = await operator.createRootKey(email, password, KeyParamsOrigination.Registration)
|
||||
|
||||
const response = await application.userApiService.register(email, accountKey.serverPassword, accountKey.keyParams)
|
||||
const response = await application.userApiService.register({
|
||||
email: email,
|
||||
serverPassword: accountKey.serverPassword,
|
||||
keyParams: accountKey.keyParams,
|
||||
})
|
||||
/** Mark all existing items as dirty. */
|
||||
await application.itemManager.changeItems(application.itemManager.items, (m) => {
|
||||
m.dirty = true
|
||||
|
||||
Reference in New Issue
Block a user