Skip to content

Commit

Permalink
[INJIWEB-247]: update the configuration
Browse files Browse the repository at this point in the history
Signed-off-by: Vijay <[email protected]>
  • Loading branch information
vijay151096 committed Apr 25, 2024
1 parent 77edfce commit 355fe39
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions inji-web/.env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
REACT_APP_MIMOTO_URL=http://localhost:3010
REACT_APP_AUTHORIZATION_REDIRECT_URL = http://localhost:3001/redirect
#REACT_APP_MIMOTO_URL=http://localhost:3010
#REACT_APP_AUTHORIZATION_REDIRECT_URL = http://localhost:3001/redirect
13 changes: 7 additions & 6 deletions inji-web/src/utils/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,15 @@ export enum MethodType {

export class api {

static mimotoHost = window.location.origin || "/v1/mimoto";
//static mimotoHost = "/v1/mimoto";
static mimotoHost = window.location.origin + "/v1/mimoto";

static authorizationRedirectionUrl = api.mimotoHost + "/redirect";
static authorizationRedirectionUrl = window.location.origin + "/redirect";
static fetchIssuers = () => "/issuers"
static searchIssuers = (searchText: string) => `/issuers?search=${searchText}`
static fetchSpecificIssuer = (issuerId: string) => `/issuers/${issuerId}`
static fetchCredentialTypes = (issuerId: string) => `/issuers/${issuerId}/credentialTypes`
static searchCredentialType = (issuerId: string, searchText: string) => `/issuers/${issuerId}/credentialTypes?search=${searchText}`
static searchIssuers = (searchText: string) => `${api.mimotoHost}/issuers?search=${searchText}`
static fetchSpecificIssuer = (issuerId: string) => `${api.mimotoHost}/issuers/${issuerId}`
static fetchCredentialTypes = (issuerId: string) => `${api.mimotoHost}/issuers/${issuerId}/credentialTypes`
static searchCredentialType = (issuerId: string, searchText: string) => `${api.mimotoHost}/issuers/${issuerId}/credentialTypes?search=${searchText}`
static authorization = (currentIssuer: IssuerObject, state: string, code_challenge: CodeChallengeObject) => {
return `${currentIssuer.authorization_endpoint}` +
`?response_type=code&` +
Expand Down

0 comments on commit 355fe39

Please sign in to comment.