Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
boco-frontend
Manage
Activity
Members
Labels
Plan
Issues
21
Issue boards
Milestones
Wiki
Code
Merge requests
0
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
idatt2106_2022_02
boco-frontend
Commits
b1fcab44
Commit
b1fcab44
authored
2 years ago
by
Gilgard
Browse files
Options
Downloads
Patches
Plain Diff
set up env
parent
87acefb7
No related branches found
Branches containing commit
No related tags found
1 merge request
!13
User profile view
Pipeline
#175999
passed with stages
in 1 minute and 20 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/utils/apiutil.js
+6
-6
6 additions, 6 deletions
src/utils/apiutil.js
with
6 additions
and
6 deletions
src/utils/apiutil.js
+
6
−
6
View file @
b1fcab44
import
axios
from
"
axios
"
;
import
{
tokenHeader
}
from
"
./token-utils
"
;
const
VUE_APP_BASEURL
=
"
http://65.108.62.223:3000/api/
"
;
const
API_URL
=
process
.
env
.
VUE_APP_BASEURL
;
export
function
doLogin
(
loginRequest
)
{
return
axios
.
post
(
VUE_APP_BASE
URL
+
"
login/authentication
"
,
loginRequest
)
.
post
(
API_
URL
+
"
login/authentication
"
,
loginRequest
)
.
then
((
response
)
=>
{
return
response
.
data
;
})
...
...
@@ -17,7 +17,7 @@ export function doLogin(loginRequest) {
export
function
registerUser
(
registerInfo
)
{
return
axios
.
post
(
VUE_APP_BASE
URL
+
"
register
"
,
{
.
post
(
API_
URL
+
"
register
"
,
{
email
:
registerInfo
.
email
,
firstName
:
registerInfo
.
firstName
,
lastname
:
registerInfo
.
lastname
,
...
...
@@ -32,7 +32,7 @@ export function registerUser(registerInfo) {
export
async
function
getUser
(
userid
)
{
return
axios
.
get
(
VUE_APP_BASE
URL
+
"
users/
"
+
userid
+
"
/profile
"
,
{
.
get
(
API_
URL
+
"
users/
"
+
userid
+
"
/profile
"
,
{
headers
:
tokenHeader
(),
})
.
then
((
response
)
=>
{
...
...
@@ -45,7 +45,7 @@ export async function getUser(userid) {
export
function
getRenterRating
(
userid
)
{
return
axios
.
get
(
VUE_APP_BASE
URL
+
"
users/
"
+
userid
+
""
,
{
.
get
(
API_
URL
+
"
users/
"
+
userid
+
""
,
{
headers
:
tokenHeader
(),
})
.
then
((
response
)
=>
{
...
...
@@ -58,7 +58,7 @@ export function getRenterRating(userid) {
export
function
getOwnerRating
(
userid
)
{
return
axios
.
get
(
VUE_APP_BASE
URL
+
"
users/
"
+
userid
+
""
,
{
.
get
(
API_
URL
+
"
users/
"
+
userid
+
""
,
{
headers
:
tokenHeader
(),
})
.
then
((
response
)
=>
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment