Created
August 21, 2019 07:40
-
-
Save frankzickert/42f1116830a65a583b09f9cff0a37af2 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export async function callGetUserService (username: string, userid: string, onData: (userData: IUserEntry) => void) { | |
await callService( | |
GETUSER_SERVICE_ID, | |
{ | |
username: username, | |
userid: userid | |
}, | |
async function (response: any) { | |
await response.json().then(function(data) { | |
console.log(data[`get_${USER_ENTRY_ID}`]); | |
onData(data[`get_${USER_ENTRY_ID}`]); | |
}); | |
}, | |
(error) => { | |
console.log("error: " , error) | |
} | |
); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment