Skip to content

Commit

Permalink
refactor: migrated from JavaScript to TypeScript (Part 2)
Browse files Browse the repository at this point in the history
WIP, not done yet, build is currently broken
  • Loading branch information
thorsten committed Jan 19, 2025
1 parent 519a484 commit 396ff78
Show file tree
Hide file tree
Showing 12 changed files with 640 additions and 638 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
- name: Setup Node.js with pnpm
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22

- name: Setup pnpm
uses: pnpm/action-setup@v4
Expand Down
1 change: 1 addition & 0 deletions phpmyfaq/admin/assets/src/api/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export * from './category';
export * from './faqs';
export * from './forms';
export * from './glossary';
export * from './group';
export * from './news';
Expand Down
12 changes: 10 additions & 2 deletions phpmyfaq/admin/assets/src/api/upgrade.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,17 @@
* @link https://www.phpmyfaq.de
* @since 2024-05-30
*/
import { Response } from '../interfaces';

export const fetchHealthCheck = async (): Promise<Response | undefined> => {
interface ResponseData {
success?: string;
warning?: string;
error?: string;
dateLastChecked?: string;
version?: string;
message?: string;
}

export const fetchHealthCheck = async (): Promise<ResponseData | undefined> => {
try {
const response = await fetch(`./api/health-check`, {
method: 'GET',
Expand Down
Loading

0 comments on commit 396ff78

Please sign in to comment.