36 fix logbook edit view error (#37)
* fixing log view edit error * fixing log view edit error * fixing log view edit error * fixing log view edit error
This commit was merged in pull request #37.
This commit is contained in:
28
.github/workflows/changes.yaml
vendored
Normal file
28
.github/workflows/changes.yaml
vendored
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
name: Changes
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
outputs:
|
||||||
|
api:
|
||||||
|
value: ${{ jobs.changes.outputs.api }}
|
||||||
|
app:
|
||||||
|
value: ${{ jobs.changes.outputs.app }}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
changes:
|
||||||
|
name: filter
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
api: ${{ steps.filter.outputs.api }}
|
||||||
|
app: ${{ steps.filter.outputs.app }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
|
- uses: dorny/paths-filter@v3
|
||||||
|
id: filter
|
||||||
|
with:
|
||||||
|
initial-fetch-depth: 2
|
||||||
|
filters: |
|
||||||
|
api:
|
||||||
|
- 'api/**'
|
||||||
|
app:
|
||||||
|
- 'app/**'
|
||||||
17
.github/workflows/main.yaml
vendored
17
.github/workflows/main.yaml
vendored
@@ -5,8 +5,14 @@ on:
|
|||||||
- main
|
- main
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
changes:
|
||||||
|
uses: ./.github/workflows/changes.yaml
|
||||||
|
|
||||||
build-api:
|
build-api:
|
||||||
|
if: ${{ needs.changes.outputs.api == 'true' }}
|
||||||
name: build-api
|
name: build-api
|
||||||
|
needs:
|
||||||
|
- changes
|
||||||
uses: ./.github/workflows/api_build.yaml
|
uses: ./.github/workflows/api_build.yaml
|
||||||
with:
|
with:
|
||||||
environment_name: test
|
environment_name: test
|
||||||
@@ -15,7 +21,9 @@ jobs:
|
|||||||
|
|
||||||
deploy-api:
|
deploy-api:
|
||||||
name: deploy-api
|
name: deploy-api
|
||||||
needs: build-api
|
needs:
|
||||||
|
- changes
|
||||||
|
- build-api
|
||||||
uses: ./.github/workflows/deploy.yaml
|
uses: ./.github/workflows/deploy.yaml
|
||||||
with:
|
with:
|
||||||
app_name: flying-app
|
app_name: flying-app
|
||||||
@@ -24,7 +32,10 @@ jobs:
|
|||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
build-app:
|
build-app:
|
||||||
|
if: ${{ needs.changes.outputs.app == 'true' }}
|
||||||
name: build-app
|
name: build-app
|
||||||
|
needs:
|
||||||
|
- changes
|
||||||
uses: ./.github/workflows/app_build.yaml
|
uses: ./.github/workflows/app_build.yaml
|
||||||
with:
|
with:
|
||||||
environment_name: test
|
environment_name: test
|
||||||
@@ -33,7 +44,9 @@ jobs:
|
|||||||
|
|
||||||
deploy-app:
|
deploy-app:
|
||||||
name: deploy-app
|
name: deploy-app
|
||||||
needs: build-app
|
needs:
|
||||||
|
- changes
|
||||||
|
- build-app
|
||||||
uses: ./.github/workflows/deploy.yaml
|
uses: ./.github/workflows/deploy.yaml
|
||||||
with:
|
with:
|
||||||
app_name: flying-app
|
app_name: flying-app
|
||||||
|
|||||||
9
.github/workflows/pull_request.yaml
vendored
9
.github/workflows/pull_request.yaml
vendored
@@ -4,8 +4,14 @@ on:
|
|||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
changes:
|
||||||
|
uses: ./.github/workflows/changes.yaml
|
||||||
|
|
||||||
build-api:
|
build-api:
|
||||||
|
if: ${{ needs.changes.outputs.api == 'true' }}
|
||||||
name: build-api
|
name: build-api
|
||||||
|
needs:
|
||||||
|
- changes
|
||||||
uses: ./.github/workflows/api_build.yaml
|
uses: ./.github/workflows/api_build.yaml
|
||||||
with:
|
with:
|
||||||
environment_name: pull_request
|
environment_name: pull_request
|
||||||
@@ -13,7 +19,10 @@ jobs:
|
|||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
build-app:
|
build-app:
|
||||||
|
if: ${{ needs.changes.outputs.app == 'true' }}
|
||||||
name: build-app
|
name: build-app
|
||||||
|
needs:
|
||||||
|
- changes
|
||||||
uses: ./.github/workflows/app_build.yaml
|
uses: ./.github/workflows/app_build.yaml
|
||||||
with:
|
with:
|
||||||
environment_name: pull_request
|
environment_name: pull_request
|
||||||
|
|||||||
@@ -10,7 +10,6 @@ export class AzureAdStrategy extends PassportStrategy(
|
|||||||
'azure-ad'
|
'azure-ad'
|
||||||
) {
|
) {
|
||||||
constructor(@Inject(MODULE_OPTIONS_TOKEN) authModuleOptions: AuthModuleOptions) {
|
constructor(@Inject(MODULE_OPTIONS_TOKEN) authModuleOptions: AuthModuleOptions) {
|
||||||
console.log(authModuleOptions)
|
|
||||||
super({
|
super({
|
||||||
identityMetadata: `https://login.microsoftonline.com/${authModuleOptions.tenantId}/.well-known/openid-configuration`,
|
identityMetadata: `https://login.microsoftonline.com/${authModuleOptions.tenantId}/.well-known/openid-configuration`,
|
||||||
clientID: authModuleOptions.clientId,
|
clientID: authModuleOptions.clientId,
|
||||||
|
|||||||
@@ -118,7 +118,7 @@ const LogForm: React.FC<ILogFormProps> = ({
|
|||||||
? { headers: { Authorization: await getAccessToken() } }
|
? { headers: { Authorization: await getAccessToken() } }
|
||||||
: {};
|
: {};
|
||||||
const response: AxiosResponse = await httpClient.get(
|
const response: AxiosResponse = await httpClient.get(
|
||||||
`api/logs/${entryId}`,
|
`api/logs/log/${entryId}`,
|
||||||
config
|
config
|
||||||
);
|
);
|
||||||
const entry = response.data;
|
const entry = response.data;
|
||||||
|
|||||||
@@ -67,7 +67,6 @@ const SiteNav: React.FC<unknown> = () => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
const getUserPhoto = async (accessToken: string): Promise<string> => {
|
const getUserPhoto = async (accessToken: string): Promise<string> => {
|
||||||
console.log(accessToken)
|
|
||||||
try {
|
try {
|
||||||
const response: AxiosResponse = await httpClient.get(`api/userPhoto`, {
|
const response: AxiosResponse = await httpClient.get(`api/userPhoto`, {
|
||||||
headers: {
|
headers: {
|
||||||
|
|||||||
Reference in New Issue
Block a user