mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-19 04:24:12 +00:00
Merge branch 'add_public_folder' into 'master'
Add public folder & Swagger Header Token See merge request CIEFWorldwideSdnBhd/shipping-portal!5
This commit is contained in:
@@ -23,5 +23,3 @@ docker/*
|
||||
db/*
|
||||
docker-compose.yml
|
||||
package-lock.json
|
||||
public/*
|
||||
/public/*
|
||||
@@ -0,0 +1,21 @@
|
||||
<IfModule mod_rewrite.c>
|
||||
<IfModule mod_negotiation.c>
|
||||
Options -MultiViews -Indexes
|
||||
</IfModule>
|
||||
|
||||
RewriteEngine On
|
||||
|
||||
# Handle Authorization Header
|
||||
RewriteCond %{HTTP:Authorization} .
|
||||
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
|
||||
|
||||
# Redirect Trailing Slashes If Not A Folder...
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteCond %{REQUEST_URI} (.+)/$
|
||||
RewriteRule ^ %1 [L,R=301]
|
||||
|
||||
# Send Requests To Front Controller...
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteRule ^ index.php [L]
|
||||
</IfModule>
|
||||
Vendored
+18604
File diff suppressed because it is too large
Load Diff
Vendored
+19
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
|
After Width: | Height: | Size: 434 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
File diff suppressed because it is too large
Load Diff
|
After Width: | Height: | Size: 89 KiB |
File diff suppressed because it is too large
Load Diff
|
After Width: | Height: | Size: 85 KiB |
Vendored
+1
File diff suppressed because one or more lines are too long
Vendored
+1
File diff suppressed because one or more lines are too long
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"/vue/app.js": "/vue/app.js"
|
||||
}
|
||||
@@ -0,0 +1,2 @@
|
||||
User-agent: *
|
||||
Disallow:
|
||||
Vendored
+18264
File diff suppressed because one or more lines are too long
@@ -0,0 +1,28 @@
|
||||
<!--
|
||||
Rewrites requires Microsoft URL Rewrite Module for IIS
|
||||
Download: https://www.iis.net/downloads/microsoft/url-rewrite
|
||||
Debug Help: https://docs.microsoft.com/en-us/iis/extensions/url-rewrite-module/using-failed-request-tracing-to-trace-rewrite-rules
|
||||
-->
|
||||
<configuration>
|
||||
<system.webServer>
|
||||
<rewrite>
|
||||
<rules>
|
||||
<rule name="Imported Rule 1" stopProcessing="true">
|
||||
<match url="^(.*)/$" ignoreCase="false" />
|
||||
<conditions>
|
||||
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
|
||||
</conditions>
|
||||
<action type="Redirect" redirectType="Permanent" url="/{R:1}" />
|
||||
</rule>
|
||||
<rule name="Imported Rule 2" stopProcessing="true">
|
||||
<match url="^" ignoreCase="false" />
|
||||
<conditions>
|
||||
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" ignoreCase="false" negate="true" />
|
||||
<add input="{REQUEST_FILENAME}" matchType="IsFile" ignoreCase="false" negate="true" />
|
||||
</conditions>
|
||||
<action type="Rewrite" url="index.php" />
|
||||
</rule>
|
||||
</rules>
|
||||
</rewrite>
|
||||
</system.webServer>
|
||||
</configuration>
|
||||
@@ -51,12 +51,12 @@
|
||||
],
|
||||
responseInterceptor:
|
||||
function (response) {
|
||||
if (response.obj.data) {
|
||||
console.log('Response');
|
||||
console.log(response.obj);
|
||||
if (response.obj.data.token) {
|
||||
console.log("Auth Token: " + response.obj.data.token);
|
||||
const token = response.obj.data.token;
|
||||
console.log('Response');
|
||||
console.log(response.obj);
|
||||
if (response.obj.payload) {
|
||||
if (response.obj.payload.access_token) {
|
||||
const token = response.obj.payload.access_token;
|
||||
console.log("Auth Token: " + token);
|
||||
localStorage.setItem("token", token)
|
||||
}
|
||||
return response;
|
||||
|
||||
@@ -1 +1 @@
|
||||
{"swagger":"2.0","info":{"description":"Shipping Portal to manage parcel","version":"1.0.0","title":"Shipping Portal"},"host":"{{request()->getHttpHost()}}","basePath":"\/api\/v1","tags":[{"name":"Account","description":"Endpoints related to user module, e.g. login, register."},{"name":"Address","description":"Endpoints related t address module, e.g. create, district."}],"schemes":["http","https"],"paths":{"\/account\/registration\/registration":{"post":{"tags":["Account"],"produces":["application\/json"],"summary":"Register user into the system","description":"","parameters":[{"name":"name","in":"query","description":"The name of user","required":true,"type":"string"},{"name":"email","in":"query","description":"The email for login","required":true,"type":"string","format":"email"},{"name":"password","in":"query","description":"The password for login","required":true,"type":"string","format":"password"},{"name":"password_confirmation","in":"query","description":"The confirmation password for login","required":true,"type":"string","format":"password"},{"name":"type","in":"query","description":"Account type","required":true,"default":3,"type":"integer"},{"name":"phone","in":"query","description":"Contact phone number","required":true,"type":"string"},{"name":"contact_email","in":"query","description":"Contact email","required":true,"type":"string"},{"name":"company_name","in":"query","description":"The company name - if not defined , name of user will save as the company name ","required":false,"type":"string"},{"name":"wechat_id","in":"query","description":"Contact Wechat id","required":false,"type":"string"}],"responses":{"200":{"description":"successful operation","headers":{"X-Expires-After":{"type":"string","format":"date-time","description":"date in UTC when token expires"},"X-Rate-Limit":{"type":"integer","format":"int32","description":"calls per hour allowed by the user"}},"schema":{"type":"string"}},"400":{"description":"Invalid username\/password supplied"}}}},"\/account\/authentication\/login\/attempt":{"post":{"tags":["Account"],"produces":["application\/json"],"summary":"Logs user into the system","description":"","parameters":[{"name":"email","in":"query","description":"The user name for login","required":true,"type":"string"},{"name":"password","in":"query","description":"The password for login in clear text","required":true,"type":"string"}],"responses":{"200":{"description":"successful operation","headers":{"X-Expires-After":{"type":"string","format":"date-time","description":"date in UTC when token expires"},"X-Rate-Limit":{"type":"integer","format":"int32","description":"calls per hour allowed by the user"}},"schema":{"type":"string"}},"400":{"description":"Invalid username\/password supplied"}}}},"\/account\/authentication\/logout":{"get":{"tags":["Account"],"summary":"Logs out current logged in user session","description":"","operationId":"logoutUser","produces":["application\/json","application\/xml"],"parameters":[],"responses":{"default":{"description":"successful operation"}}}},"\/address\/id\/show":{"get":{"tags":["Address"],"summary":"Logs out current logged in user session","description":"","operationId":"logoutUser","produces":["application\/json","application\/xml"],"parameters":[],"responses":{"default":{"description":"successful operation"}}}},"\/address\/create":{"post":{"tags":["Address"],"summary":"Logs out current logged in user session","description":"","operationId":"logoutUser","produces":["application\/json","application\/xml"],"parameters":[],"responses":{"default":{"description":"successful operation"}}}},"\/address\/update\/id":{"put":{"tags":["Address"],"summary":"Logs out current logged in user session","description":"","operationId":"logoutUser","produces":["application\/json","application\/xml"],"parameters":[],"responses":{"default":{"description":"successful operation"}}}},"\/address\/delete\/id":{"delete":{"tags":["Address"],"summary":"Logs out current logged in user session","description":"","operationId":"logoutUser","produces":["application\/json","application\/xml"],"parameters":[],"responses":{"default":{"description":"successful operation"}}}}},"securityDefinitions":{"Authorization":{"type":"apiKey","name":"api_key","in":"header"},"petstore_auth":{"type":"oauth2","authorizationUrl":"https:\/\/petstore.swagger.io\/oauth\/authorize","flow":"implicit","scopes":{"read:pets":"read your pets","write:pets":"modify pets in your account"}}},"definitions":{"ApiResponse":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"title":{"type":"string"},"message":{"type":"string"},"payload":{"type":"object"}}}}}
|
||||
{"swagger":"2.0","info":{"description":"Shipping Portal to manage parcel","version":"1.0.0","title":"Shipping Portal"},"host":"{{request()->getHttpHost()}}","basePath":"/api/v1","tags":[{"name":"Account","description":"Endpoints related to user module, e.g. login, register."},{"name":"Address","description":"Endpoints related t address module, e.g. create, district."}],"schemes":["http","https"],"paths":{"/account/registration/registration":{"post":{"tags":["Account"],"produces":["application/json"],"summary":"Register user into the system","description":"","parameters":[{"name":"name","in":"query","description":"The name of user","required":true,"type":"string"},{"name":"email","in":"query","description":"The email for login","required":true,"type":"string","format":"email"},{"name":"password","in":"query","description":"The password for login","required":true,"type":"string","format":"password"},{"name":"password_confirmation","in":"query","description":"The confirmation password for login","required":true,"type":"string","format":"password"},{"name":"type","in":"query","description":"Account type","required":true,"default":3,"type":"integer"},{"name":"phone","in":"query","description":"Contact phone number","required":true,"type":"string"},{"name":"contact_email","in":"query","description":"Contact email","required":true,"type":"string"},{"name":"company_name","in":"query","description":"The company name - if not defined , name of user will save as the company name ","required":false,"type":"string"},{"name":"wechat_id","in":"query","description":"Contact Wechat id","required":false,"type":"string"}],"responses":{"200":{"description":"successful operation","headers":{"X-Expires-After":{"type":"string","format":"date-time","description":"date in UTC when token expires"},"X-Rate-Limit":{"type":"integer","format":"int32","description":"calls per hour allowed by the user"}},"schema":{"type":"string"}},"400":{"description":"Invalid username/password supplied"}}}},"/account/authentication/login/attempt":{"post":{"tags":["Account"],"produces":["application/json"],"summary":"Logs user into the system","description":"","parameters":[{"name":"email","in":"query","description":"The user name for login","required":true,"type":"string"},{"name":"password","in":"query","description":"The password for login in clear text","required":true,"type":"string"}],"responses":{"200":{"description":"successful operation","headers":{"X-Expires-After":{"type":"string","format":"date-time","description":"date in UTC when token expires"},"X-Rate-Limit":{"type":"integer","format":"int32","description":"calls per hour allowed by the user"}},"schema":{"type":"string"}},"400":{"description":"Invalid username/password supplied"}}}},"/account/authentication/logout":{"get":{"tags":["Account"],"summary":"Logs out current logged in user session","description":"","operationId":"logoutUser","produces":["application/json","application/xml"],"parameters":[],"responses":{"default":{"description":"successful operation"}}}},"/address/id/show":{"get":{"tags":["Address"],"summary":"Logs out current logged in user session","description":"","operationId":"logoutUser","produces":["application/json","application/xml"],"parameters":[],"responses":{"default":{"description":"successful operation"}}}},"/address/create":{"post":{"tags":["Address"],"summary":"Logs out current logged in user session","description":"","operationId":"logoutUser","produces":["application/json","application/xml"],"parameters":[],"responses":{"default":{"description":"successful operation"}}}},"/address/update/id":{"put":{"tags":["Address"],"summary":"Logs out current logged in user session","description":"","operationId":"logoutUser","produces":["application/json","application/xml"],"parameters":[],"responses":{"default":{"description":"successful operation"}}}},"/address/delete/id":{"delete":{"tags":["Address"],"summary":"Logs out current logged in user session","description":"","operationId":"logoutUser","produces":["application/json","application/xml"],"parameters":[],"responses":{"default":{"description":"successful operation"}}}},"/account/user/list":{"get":{"tags":["Account"],"summary":"Logs out current logged in user session","description":"","operationId":"userList","produces":["application/json","application/xml"],"parameters":[],"responses":{"default":{"description":"successful operation"}}}}},"securityDefinitions":{"Authorization":{"type":"apiKey","name":"api_key","in":"header"},"petstore_auth":{"type":"oauth2","authorizationUrl":"https://petstore.swagger.io/oauth/authorize","flow":"implicit","scopes":{"read:pets":"read your pets","write:pets":"modify pets in your account"}}},"definitions":{"ApiResponse":{"type":"object","properties":{"code":{"type":"integer","format":"int32"},"title":{"type":"string"},"message":{"type":"string"},"payload":{"type":"object"}}}}}
|
||||
Reference in New Issue
Block a user