refactor: http service (#2233)

This commit is contained in:
Mo
2023-02-28 20:43:25 -06:00
committed by GitHub
parent 6e7618b258
commit e7f1d35341
142 changed files with 1116 additions and 1307 deletions

View File

@@ -48,13 +48,13 @@ export function CreateAnyKeyParams(keyParams: AnyKeyParamsContent) {
export function KeyParamsFromApiResponse(response: KeyParamsResponse, identifier?: string) {
const rawKeyParams: AnyKeyParamsContent = {
identifier: identifier || response.data.identifier!,
pw_cost: response.data.pw_cost!,
pw_nonce: response.data.pw_nonce!,
pw_salt: response.data.pw_salt!,
version: ProtocolVersionForKeyParams(response.data),
origination: response.data.origination,
created: response.data.created,
identifier: identifier || response.identifier!,
pw_cost: response.pw_cost!,
pw_nonce: response.pw_nonce!,
pw_salt: response.pw_salt!,
version: ProtocolVersionForKeyParams(response),
origination: response.origination,
created: response.created,
}
return CreateAnyKeyParams(rawKeyParams)
}