Skip to content

Commit

Permalink
Move api folder to functions folder
Browse files Browse the repository at this point in the history
  • Loading branch information
bokub committed Jul 11, 2024
1 parent 9b11c94 commit 251412a
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions api/[type].ts → functions/api/[type].ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ import axios from 'axios';
import * as qs from 'qs';
import pino from 'pino';
import { z } from 'zod';
import { getAPIToken } from '../lib/token';
import { dataPoints, dataURLs } from '../lib/url';
import { isTokenValid } from '../lib/auth';
import { Env } from '../lib/env';
import { getAPIToken } from '../../lib/token';
import { dataPoints, dataURLs } from '../../lib/url';
import { isTokenValid } from '../../lib/auth';
import { Env } from '../../lib/env';

const logger = pino();

Expand Down
2 changes: 1 addition & 1 deletion api/auth.ts → functions/api/auth.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Env } from '../lib/env';
import { Env } from '../../lib/env';

export const onRequest: PagesFunction<Env> = async ({ request: req, env }) => {
const state = 'v2_' + Array.from({ length: 8 }, () => Math.random().toString(36)[2]).join('');
Expand Down
4 changes: 2 additions & 2 deletions api/callback.ts → functions/api/callback.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { generateToken } from '../lib/auth';
import { Env } from '../lib/env';
import { generateToken } from '../../lib/auth';
import { Env } from '../../lib/env';
import { z } from 'zod';
import pino from 'pino';
const logger = pino();
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
// https://nuxt.com/docs/guide/concepts/typescript
"exclude": ["api/**/*"],
"exclude": ["functions/**/*"],
"extends": "./.nuxt/tsconfig.json"
}

0 comments on commit 251412a

Please sign in to comment.