From 235555e9259d5eda2bcfd3472b00e3bfe6b8c375 Mon Sep 17 00:00:00 2001 From: eftychis Date: Tue, 18 Feb 2020 14:06:55 -0800 Subject: [PATCH] fix: Switch request-status to snake case (#389) --- src/userlib/js/src/actor.test.ts | 6 +++--- src/userlib/js/src/http_agent_types.ts | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/src/userlib/js/src/actor.test.ts b/src/userlib/js/src/actor.test.ts index 260c23a2ef..6e01d38feb 100644 --- a/src/userlib/js/src/actor.test.ts +++ b/src/userlib/js/src/actor.test.ts @@ -129,7 +129,7 @@ test('makeActor', async () => { 'Content-Type': 'application/cbor', }, body: cbor.encode({ - request_type: 'request-status', + request_type: 'request_status', request_id: expectedCallRequestId, nonce: nonces[1], sender_pubkey: senderPubKey, @@ -145,7 +145,7 @@ test('makeActor', async () => { 'Content-Type': 'application/cbor', }, body: cbor.encode({ - request_type: 'request-status', + request_type: 'request_status', request_id: expectedCallRequestId, nonce: nonces[2], sender_pubkey: senderPubKey, @@ -160,7 +160,7 @@ test('makeActor', async () => { 'Content-Type': 'application/cbor', }, body: cbor.encode({ - request_type: 'request-status', + request_type: 'request_status', request_id: expectedCallRequestId, nonce: nonces[3], sender_pubkey: senderPubKey, diff --git a/src/userlib/js/src/http_agent_types.ts b/src/userlib/js/src/http_agent_types.ts index 09d1d35837..e11f0217b1 100644 --- a/src/userlib/js/src/http_agent_types.ts +++ b/src/userlib/js/src/http_agent_types.ts @@ -87,7 +87,7 @@ export const enum QueryResponseStatus { // The types of values allowed in the `request_type` field for read requests. export const enum ReadRequestType { Query = 'query', - RequestStatus = 'request-status', + RequestStatus = 'request_status', } // The fields in a "query" read request. @@ -98,13 +98,13 @@ export interface QueryRequest extends Record { arg: BinaryBlob; } -// The fields in a "request-status" read request. +// The fields in a "request_status" read request. export interface RequestStatusRequest extends Record { request_type: ReadRequestType.RequestStatus; request_id: RequestId; } -// An ADT that represents responses to a "request-status" read request. +// An ADT that represents responses to a "request_status" read request. export type RequestStatusResponse = | RequestStatusResponsePending | RequestStatusResponseReplied