Skip to content

Commit 59c06ab

Browse files
committed
fixing build
1 parent 4348f2c commit 59c06ab

File tree

2 files changed

+2
-21
lines changed

2 files changed

+2
-21
lines changed

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ jobs:
3939
run: yarn test
4040

4141
- name: Run Contract Testings
42-
run: npm run test:contract
42+
run: yarn test:contract
4343

4444
- name: Restore cache Next.js build
4545
uses: actions/cache@v3
@@ -97,7 +97,7 @@ jobs:
9797
run: yarn test
9898

9999
- name: Run Contract Testings
100-
run: npm run test:contract
100+
run: yarn test:contract
101101

102102
- name: Build API
103103
run: yarn build

webapp/app/api/url-shortener/route.ts

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -14,23 +14,4 @@ export async function POST(request: NextRequest) {
1414
} catch (error: any) {
1515
return NextResponse.json({ error: error.message }, { status: 400 });
1616
}
17-
/*
18-
return fetch('http://localhost:3000/shorten-url', {
19-
method: 'POST',
20-
headers: { 'Content-Type': 'application/json' },
21-
body: JSON.stringify({ url }),
22-
})
23-
.then(async (res) => {
24-
if (!res.ok)
25-
throw new Error((await res.json()).error || 'Failed to shorten URL');
26-
return res.json();
27-
})
28-
.then((data) =>
29-
NextResponse.json({ shortenedUrl: data.shortenedUrl }, { status: 200 })
30-
)
31-
.catch((error) => {
32-
console.error('Error shortening URL:', error);
33-
return NextResponse.json({ error: error.message }, { status: 400 });
34-
});
35-
*/
3617
}

0 commit comments

Comments
 (0)