1
0
mirror of https://github.com/sasjs/adapter.git synced 2026-01-10 13:50:05 +00:00

feat(server): added sasjs server support

This commit is contained in:
Saad Jutt
2021-12-05 18:31:36 +05:00
parent 81d959c7c1
commit 712d1549c7
6 changed files with 47 additions and 31 deletions

View File

@@ -4,7 +4,7 @@ import { JsonParseArrayError, InvalidJsonError } from '../types/errors'
* if string passed then parse the string to json else if throw error for all other types unless it is not a valid json object.
* @param str - string to check.
*/
export const getValidJson = (str: string | object) => {
export const getValidJson = (str: string | object): object => {
try {
if (str === null || str === undefined) throw new InvalidJsonError()

View File

@@ -1,6 +1,6 @@
import { WeboutResponseError } from '../types/errors'
export const parseWeboutResponse = (response: string, url?: string) => {
export const parseWeboutResponse = (response: string, url?: string): string => {
let sasResponse = ''
if (response.includes('>>weboutBEGIN<<')) {