diff options
author | Justin Shillingford <jgs272@cornell.edu> | 2020-07-06 18:48:58 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-07-06 18:48:58 -0400 |
commit | ff358c8927086a69f6732b6e7e1abb85a9e3cc84 (patch) | |
tree | 818a8190280a7efab9c04195e9d683ecbf00ea53 /src/constants/index.ts | |
parent | d2a1005d200abb91f72938d152a1493cb845d970 (diff) |
[TMA63/4] - Presenting alert with result of login attempt (#12)
* Added 'Packages added' section to PR Template
* Added a checklist item about rebasing before PR
* Misspelled 'succinct' lol 😅
* Implemented POST request for login
Presents alert based on response code
* Made the alert messages more robust
* Updated terminology and function documentation
* Consolidated lines about rebasing
Helps to keep the checklist short and concise
* A redundant logo image somehow made it through lol
* Moved API endpoints to a separate constants file
* Refactored login to use async/await
* [TMA-62] Basic Login Input Validation (#11)
* Updated createRef() to useRef()
* Animated invalid input hint
Also removed useless focusPasswordInput prop
* Users can no longer submit without typing
* Added basic input validation for Username
* Fixed username input validation 😅
* Removed autocapitalize from keyboard
* Trim username input as early as possible
Also removed trim from password
* Adjusted styling to accomodate longer hint message
* Lint cleaning
* Updated documentation of update methods
* Forgot to include periods in the error message 😅
* Modified styling to accomodate longer hint
* Implemented POST request for login
Presents alert based on response code
* Made the alert messages more robust
* Updated terminology and function documentation
* A redundant logo image somehow made it through lol
* Moved API endpoints to a separate constants file
* Refactored login to use async/await
* Removed artifact from merge conflict resolution
Co-authored-by: Husam Salhab <47015061+hsalhab@users.noreply.github.com>
Diffstat (limited to 'src/constants/index.ts')
-rw-r--r-- | src/constants/index.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/constants/index.ts b/src/constants/index.ts new file mode 100644 index 00000000..0667a187 --- /dev/null +++ b/src/constants/index.ts @@ -0,0 +1,5 @@ +// Backend API constants +export const API_ENDPOINT: string = 'http://127.0.0.1:8000/api/'; +export const LOGIN_ENDPOINT: string = 'http://127.0.0.1:8000/api/login/'; +export const LOGOUT_ENDPOINT: string = 'http://127.0.0.1:8000/api/logout/'; +export const REGISTER_ENDPOINT: string = 'http://127.0.0.1:8000/api/register/'; |