Accept numbers for the hash_method option when generating f parameters

This commit is contained in:
Samuel Elliott
2022-09-07 10:16:16 +01:00
parent 960624cae4
commit 66c8efdb96
4 changed files with 39 additions and 20 deletions

View File

@@ -183,7 +183,7 @@ export async function handler(argv: ArgumentsCamelCase<Arguments>) {
await ready;
let data: {
hash_method: '1' | '2';
hash_method: '1' | '2' | 1 | 2;
token: string;
timestamp?: string | number;
request_id?: string;
@@ -203,6 +203,9 @@ export async function handler(argv: ArgumentsCamelCase<Arguments>) {
request_id: data.uuid,
};
if (data && data.hash_method === 1) data.hash_method = '1';
if (data && data.hash_method === 2) data.hash_method = '2';
if (
!data ||
typeof data !== 'object' ||