Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- let search = (username, surname, email, dob, page = 1, perPage = 20) => {
- if(username !== '' && username !== undefined)
- body['username'] = username;
- if(surname !== '' && surname !== undefined)
- body['surname'] = surname;
- if(email !== '' && email !== undefined)
- body['email'] = email;
- if(dob !== '' && dob !== undefined)
- body['dob'] = dob;
- let options = {
- method: "PUT",
- body: JSON.stringify(body),
- headers: {
- "Content-Type": 'application/json'
- },
- credentials: 'same-origin'
- };
- return options;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement