-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ad0755b
commit 4b6b8c4
Showing
3 changed files
with
67 additions
and
1 deletion.
There are no files selected for viewing
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
|
||
import API from "../../../api"; | ||
import ENDPOINTS from "../../../../config/apiendpoint"; | ||
|
||
export default class ResendUserInviteAPI extends API { | ||
constructor(email, timeout = 2000) { | ||
super("POST", timeout, false); | ||
this.email = email; | ||
this.endpoint = `${super.apiEndPointAuto()}${ENDPOINTS.resetPassword}`; | ||
this.endpoint = `${super.apiEndPointAuto()}${ENDPOINTS.signup}regenerate/`; | ||
} | ||
|
||
processResponse(res) { | ||
super.processResponse(res); | ||
if (res) { | ||
this.resendinviteRes = res; | ||
} | ||
} | ||
|
||
apiEndPoint() { | ||
return this.endpoint; | ||
} | ||
|
||
getBody() { | ||
return { | ||
emails : this.email | ||
} | ||
} | ||
|
||
|
||
getHeaders() { | ||
this.headers = { | ||
headers: { | ||
"Content-Type": "application/json", | ||
"Authorization":`JWT ${localStorage.getItem('token')}` | ||
}, | ||
}; | ||
return this.headers; | ||
} | ||
|
||
getPayload() { | ||
return this.resendinviteRes; | ||
} | ||
} | ||
|
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