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:
@@ -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()
|
||||
|
||||
|
||||
@@ -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<<')) {
|
||||
|
||||
Reference in New Issue
Block a user