mirror of
https://github.com/bs-community/blessing-skin-server.git
synced 2025-01-09 04:27:47 +08:00
commit generated code to vcs
This commit is contained in:
parent
c662121ad9
commit
1cf4101cde
23
.github/workflows/CI.yml
vendored
23
.github/workflows/CI.yml
vendored
@ -90,20 +90,11 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: 7.4
|
||||
coverage: none
|
||||
extensions: mbstring, dom, fileinfo, gd
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
yarn
|
||||
composer install --prefer-dist --no-progress --no-suggest --no-dev
|
||||
run: yarn
|
||||
- name: Run checks
|
||||
run: |
|
||||
# yarn lint
|
||||
yarn build:urls
|
||||
yarn tsc -p . --noEmit
|
||||
yarn tsc -p ./resources/assets/tests --noEmit
|
||||
jest:
|
||||
@ -113,18 +104,8 @@ jobs:
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
- name: Setup PHP
|
||||
uses: shivammathur/setup-php@v2
|
||||
with:
|
||||
php-version: 7.4
|
||||
coverage: none
|
||||
extensions: mbstring, dom, fileinfo, gd
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
yarn
|
||||
composer install --prefer-dist --no-progress --no-suggest --no-dev
|
||||
- name: Build
|
||||
run: yarn build:urls
|
||||
run: yarn
|
||||
- name: Run tests
|
||||
run: yarn test --coverage
|
||||
- name: Upload coverage report
|
||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -27,4 +27,3 @@ storage/options.php
|
||||
.php_cs.cache
|
||||
resources/views/overrides
|
||||
public/sw.js
|
||||
resources/assets/src/scripts/urls.ts
|
||||
|
62
resources/assets/src/scripts/urls.ts
Normal file
62
resources/assets/src/scripts/urls.ts
Normal file
@ -0,0 +1,62 @@
|
||||
export default {
|
||||
admin: {
|
||||
players: {
|
||||
list: () => '/admin/players/list' as const,
|
||||
delete: (player: number) => `/admin/players/${player}`,
|
||||
name: (player: number) => `/admin/players/${player}/name`,
|
||||
owner: (player: number) => `/admin/players/${player}/owner`,
|
||||
texture: (player: number) => `/admin/players/${player}/textures`,
|
||||
},
|
||||
users: {
|
||||
list: () => '/admin/users/list' as const,
|
||||
delete: (user: number) => `/admin/users/${user}`,
|
||||
email: (user: number) => `/admin/users/${user}/email`,
|
||||
nickname: (user: number) => `/admin/users/${user}/nickname`,
|
||||
password: (user: number) => `/admin/users/${user}/password`,
|
||||
permission: (user: number) => `/admin/users/${user}/permission`,
|
||||
score: (user: number) => `/admin/users/${user}/score`,
|
||||
verification: (user: number) => `/admin/users/${user}/verification`,
|
||||
},
|
||||
},
|
||||
auth: {
|
||||
bind: () => '/auth/bind' as const,
|
||||
forgot: () => '/auth/forgot' as const,
|
||||
login: () => '/auth/login' as const,
|
||||
logout: () => '/auth/logout' as const,
|
||||
register: () => '/auth/register' as const,
|
||||
reset: (uid: number) => `/auth/reset/${uid}`,
|
||||
verify: (uid: number) => `/auth/verify/${uid}`,
|
||||
},
|
||||
skinlib: {
|
||||
home: () => '/skinlib' as const,
|
||||
info: (tid: number) => `/skinlib/info/${tid}`,
|
||||
list: () => '/skinlib/list' as const,
|
||||
show: (tid: number) => `/skinlib/show/${tid}`,
|
||||
upload: () => '/skinlib/upload' as const,
|
||||
},
|
||||
user: {
|
||||
home: () => '/user' as const,
|
||||
closet: {
|
||||
add: () => '/user/closet' as const,
|
||||
page: () => '/user/closet' as const,
|
||||
ids: () => '/user/closet/ids' as const,
|
||||
list: () => '/user/closet/list' as const,
|
||||
remove: (tid: number) => `/user/closet/${tid}`,
|
||||
rename: (tid: number) => `/user/closet/${tid}`,
|
||||
},
|
||||
notification: (id: number) => `/user/notifications/${id}`,
|
||||
player: {
|
||||
page: () => '/user/player' as const,
|
||||
add: () => '/user/player/add' as const,
|
||||
bind: () => '/user/player/bind' as const,
|
||||
delete: (pid: number) => `/user/player/delete/${pid}`,
|
||||
list: () => '/user/player/list' as const,
|
||||
rename: (pid: number) => `/user/player/rename/${pid}`,
|
||||
set: (pid: number) => `/user/player/set/${pid}`,
|
||||
clear: (pid: number) => `/user/player/texture/clear/${pid}`,
|
||||
},
|
||||
profile: { avatar: () => '/user/profile/avatar' as const },
|
||||
score: () => '/user/score-info' as const,
|
||||
sign: () => '/user/sign' as const,
|
||||
},
|
||||
}
|
Loading…
Reference in New Issue
Block a user