Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
D
dcarfixers
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
2
Issues
2
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tobin
dcarfixers
Commits
b9af1141
Commit
b9af1141
authored
Aug 09, 2019
by
Jansa Jose
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
change auth spelling and secret key
parent
128dae6f
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
12 deletions
+12
-12
Webservices.php
application/controllers/Webservices.php
+1
-2
Webservices_mechanic.php
application/controllers/Webservices_mechanic.php
+9
-9
Booking_model.php
application/models/Booking_model.php
+2
-1
No files found.
application/controllers/Webservices.php
View file @
b9af1141
...
...
@@ -23,8 +23,7 @@
$this
->
load
->
model
(
'Webservice_model'
);
$this
->
load
->
library
(
'form_validation'
);
//define("PAYSTACK_SECRET_KEY", "sk_test_36658e3260b1d1668b563e6d8268e46ad6da3273");
define
(
"PAYSTACK_SECRET_KEY"
,
"sk_test_dae3d816baeeabcab5063def4aad5fe546e9758d"
);
define
(
"PAYSTACK_SECRET_KEY"
,
"sk_live_ac1f5350a42852fd3439fdac8ba1d434f1c42360"
);
date_default_timezone_set
(
'Asia/Kolkata'
);
}
// customer_login
...
...
application/controllers/Webservices_mechanic.php
View file @
b9af1141
...
...
@@ -23,7 +23,7 @@
$this
->
load
->
model
(
'Webservice_mechanic_model'
);
$this
->
load
->
library
(
'form_validation'
);
define
(
"PAYSTACK_SECRET_KEY"
,
"sk_
test_36658e3260b1d1668b563e6d8268e46ad6da3273
"
);
define
(
"PAYSTACK_SECRET_KEY"
,
"sk_
live_ac1f5350a42852fd3439fdac8ba1d434f1c42360
"
);
}
// customer_login
...
...
@@ -44,12 +44,12 @@
public
function
get_todays_services
(){
header
(
'Content-type: application/json'
);
$headers
=
apache_request_headers
();
if
(
!
isset
(
$headers
[
'
Auth'
])
||
empty
(
$headers
[
'A
uth'
])){
if
(
!
isset
(
$headers
[
'
auth'
])
||
empty
(
$headers
[
'a
uth'
])){
$respArr
[
'status'
]
=
'error'
;
$respArr
[
'message'
]
=
'Authtoken is Required'
;
echo
json_encode
(
$respArr
);
exit
;
}
$authRes
=
$this
->
Webservice_mechanic_model
->
get_mechanic_authtoken
(
$headers
[
'
A
uth'
]);
$authRes
=
$this
->
Webservice_mechanic_model
->
get_mechanic_authtoken
(
$headers
[
'
a
uth'
]);
if
(
$authRes
[
'status'
]
==
'error'
){
echo
json_encode
(
$authRes
);
exit
;
}
...
...
@@ -102,12 +102,12 @@
public
function
services_details
(){
header
(
'Content-type: application/json'
);
$headers
=
apache_request_headers
();
if
(
!
isset
(
$headers
[
'
Auth'
])
||
empty
(
$headers
[
'A
uth'
])){
if
(
!
isset
(
$headers
[
'
auth'
])
||
empty
(
$headers
[
'a
uth'
])){
$respArr
[
'status'
]
=
'error'
;
$respArr
[
'message'
]
=
'Authtoken is Required'
;
echo
json_encode
(
$respArr
);
exit
;
}
$authRes
=
$this
->
Webservice_mechanic_model
->
get_mechanic_authtoken
(
$headers
[
'
A
uth'
]);
$authRes
=
$this
->
Webservice_mechanic_model
->
get_mechanic_authtoken
(
$headers
[
'
a
uth'
]);
if
(
$authRes
[
'status'
]
==
'error'
){
echo
json_encode
(
$authRes
);
exit
;
}
...
...
@@ -125,12 +125,12 @@
public
function
get_service_history
(){
header
(
'Content-type: application/json'
);
$headers
=
apache_request_headers
();
if
(
!
isset
(
$headers
[
'
Auth'
])
||
empty
(
$headers
[
'A
uth'
])){
if
(
!
isset
(
$headers
[
'
auth'
])
||
empty
(
$headers
[
'a
uth'
])){
$respArr
[
'status'
]
=
'error'
;
$respArr
[
'message'
]
=
'Authtoken is Required'
;
echo
json_encode
(
$respArr
);
exit
;
}
$authRes
=
$this
->
Webservice_mechanic_model
->
get_mechanic_authtoken
(
$headers
[
'
A
uth'
]);
$authRes
=
$this
->
Webservice_mechanic_model
->
get_mechanic_authtoken
(
$headers
[
'
a
uth'
]);
if
(
$authRes
[
'status'
]
==
'error'
){
echo
json_encode
(
$authRes
);
exit
;
}
...
...
@@ -183,12 +183,12 @@
public
function
logout
(){
header
(
'Content-type: application/json'
);
$headers
=
apache_request_headers
();
if
(
!
isset
(
$headers
[
'
Auth'
])
||
empty
(
$headers
[
'A
uth'
])){
if
(
!
isset
(
$headers
[
'
auth'
])
||
empty
(
$headers
[
'a
uth'
])){
$respArr
[
'status'
]
=
'error'
;
$respArr
[
'message'
]
=
'Authtoken is Required'
;
echo
json_encode
(
$respArr
);
exit
;
}
$authRes
=
$this
->
Webservice_mechanic_model
->
get_mechanic_authtoken
(
$headers
[
'
A
uth'
]);
$authRes
=
$this
->
Webservice_mechanic_model
->
get_mechanic_authtoken
(
$headers
[
'
a
uth'
]);
if
(
$authRes
[
'status'
]
==
'error'
){
echo
json_encode
(
$authRes
);
exit
;
}
...
...
application/models/Booking_model.php
View file @
b9af1141
...
...
@@ -107,7 +107,8 @@ class Booking_model extends CI_Model {
FROM bookings AS BK
INNER JOIN customer_vehicle AS VEH ON (VEH.customer_veh_id = BK.customer_veh_id)
WHERE
$cond
GROUP BY BK.booking_id"
;
GROUP BY BK.booking_id
ORDER BY BK.booking_id DESC"
;
$bookData
=
$this
->
db
->
query
(
$sql
);
if
(
empty
(
$bookData
)){
return
0
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment