Skip to content

Commit

Permalink
feat: add profile in settings (#67)
Browse files Browse the repository at this point in the history
1. update ci tag detect logic
2. add profile Controller in settings erver
  • Loading branch information
pengpeng authored Dec 9, 2024
1 parent 8224ebc commit aa53eb8
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 14 deletions.
5 changes: 2 additions & 3 deletions .github/workflows/release-editor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ jobs:
- name: get latest tag
uses: "WyriHaximus/github-action-get-previous-tag@v1"
id: get-latest-tag
with:
fallback: latest

- name: Setup Node
uses: actions/setup-node@v1
with:
Expand All @@ -55,7 +54,7 @@ jobs:
- name: Build and push
uses: docker/build-push-action@v3
env:
TAG: ${{ steps.get-latest-tag.outputs.tag || github.event.inputs.tags}}
TAG: ${{ steps.get-latest-tag.outputs.tag || github.event.inputs.tags || 'latest'}}
with:
context: .
file: ./docker/profile/Dockerfile-profile-frontend
Expand Down
5 changes: 2 additions & 3 deletions .github/workflows/release-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ jobs:
- name: get latest tag
uses: "WyriHaximus/github-action-get-previous-tag@v1"
id: get-latest-tag
with:
fallback: latest

- name: Setup Node
uses: actions/setup-node@v1
with:
Expand All @@ -41,7 +40,7 @@ jobs:
- name: Build and push
uses: docker/build-push-action@v3
env:
TAG: ${{ steps.get-latest-tag.outputs.tag || github.event.inputs.tags}}
TAG: ${{ steps.get-latest-tag.outputs.tag || github.event.inputs.tags || 'latest'}}
with:
context: .
file: ./docker/profile/Dockerfile-profile-preview
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/release-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,10 @@ jobs:
- name: get latest tag
uses: "WyriHaximus/github-action-get-previous-tag@v1"
id: get-latest-tag
with:
fallback: latest
- name: Build and push
uses: docker/build-push-action@v3
env:
TAG: ${{ steps.get-latest-tag.outputs.tag || github.event.inputs.tags}}
TAG: ${{ steps.get-latest-tag.outputs.tag || github.event.inputs.tags || 'latest'}}
with:
context: .
file: ./docker/Dockerfile-server
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/release-settings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,6 @@ jobs:
- name: get latest tag
uses: "WyriHaximus/github-action-get-previous-tag@v1"
id: get-latest-tag
with:
fallback: latest

- name: Setup Node
uses: actions/setup-node@v1
Expand Down Expand Up @@ -72,7 +70,7 @@ jobs:
- name: Build and push
uses: docker/build-push-action@v3
env:
TAG: ${{ steps.get-latest-tag.outputs.tag || github.event.inputs.tags}}
TAG: ${{ steps.get-latest-tag.outputs.tag || github.event.inputs.tags || 'latest'}}
with:
context: .
file: ./docker/settings/Dockerfile-settings-frontend
Expand Down
4 changes: 4 additions & 0 deletions packages/server/src/app.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ import { CookieController } from './cookie.controller';
import { AppController } from './app.controller';
import { EventController } from './event.controller';
import { TerminusdController } from './terminusd.controller';
import { ProfileController } from './profile.controller';
import { TerminusInfoController } from './terminus.controller';

@Module({
imports: [BFLModule, HeadScaleModule, ScheduleModule.forRoot()],
Expand All @@ -39,6 +41,8 @@ import { TerminusdController } from './terminusd.controller';
EventController,
CookieController,
TerminusdController,
ProfileController,
TerminusInfoController,
],
providers: [
SecretService,
Expand Down
4 changes: 2 additions & 2 deletions packages/server/src/profile.controller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ function stringToIntHash(str: string, lowerbound: number, upperbound: number) {
}

@Controller('/api/profile')
export class UserController {
private readonly logger = new Logger(UserController.name);
export class ProfileController {
private readonly logger = new Logger(ProfileController.name);

private key = 'profile_user_info_v2';

Expand Down

0 comments on commit aa53eb8

Please sign in to comment.