You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by ju...@apache.org on 2020/03/12 02:22:52 UTC
[incubator-apisix-dashboard] branch ssl-module created (now d20e4f5)
This is an automated email from the ASF dual-hosted git repository.
juzhiyuan pushed a change to branch ssl-module
in repository https://gitbox.apache.org/repos/asf/incubator-apisix-dashboard.git.
at d20e4f5 feat: fake fetchCurrentUser & rewrite dev api
This branch includes the following new commits:
new d20e4f5 feat: fake fetchCurrentUser & rewrite dev api
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
[incubator-apisix-dashboard] 01/01: feat: fake fetchCurrentUser &
rewrite dev api
Posted by ju...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
juzhiyuan pushed a commit to branch ssl-module
in repository https://gitbox.apache.org/repos/asf/incubator-apisix-dashboard.git
commit d20e4f5c943aa512bb46a6dab46b8cdb5099464d
Author: juzhiyuan <jj...@gmail.com>
AuthorDate: Thu Mar 12 10:22:27 2020 +0800
feat: fake fetchCurrentUser & rewrite dev api
---
config/proxy.ts | 4 ++--
public/favicon.png | Bin 2849 -> 85376 bytes
src/services/user.ts | 7 ++++++-
3 files changed, 8 insertions(+), 3 deletions(-)
diff --git a/config/proxy.ts b/config/proxy.ts
index 3fa70dd..e189b0f 100644
--- a/config/proxy.ts
+++ b/config/proxy.ts
@@ -8,9 +8,9 @@
export default {
dev: {
'/api/': {
- target: 'https://preview.pro.ant.design',
+ target: 'https://apisix.iresty.com/apisix/admin/',
changeOrigin: true,
- pathRewrite: { '^': '' },
+ pathRewrite: { '^/api': '' },
},
},
test: {
diff --git a/public/favicon.png b/public/favicon.png
index ece59ce..381ab08 100644
Binary files a/public/favicon.png and b/public/favicon.png differ
diff --git a/src/services/user.ts b/src/services/user.ts
index 1988721..1e5fec8 100644
--- a/src/services/user.ts
+++ b/src/services/user.ts
@@ -5,7 +5,12 @@ export async function query(): Promise<any> {
}
export async function queryCurrent(): Promise<any> {
- return request('/api/currentUser');
+ // NOTE: APISIX doesnât support user login currently, we return fake data directly.
+ return {
+ name: 'APISIX User',
+ avatar: 'favicon.png',
+ userid: '00000001',
+ };
}
export async function queryNotices(): Promise<any> {