Skip to content

Changes #17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: migration
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Build on PR
on:
pull_request:
branches:
- "**"

jobs:
build_PR:
name: Building PR
runs-on: ubuntu-latest
steps:
- name: Clone repo
uses: actions/checkout@v3

- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: "20"

- name: Install Dependencies
run: npm install

- name: Generate Prisma client
run: cd packages/db && npx prisma generate && cd ../..

- name: Build
run: npm run build
5 changes: 5 additions & 0 deletions apps/merchant-app/app/api/auth/[...nextauth]/route.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,9 @@ import { authOptions } from "../../../../lib/auth"

const handler = NextAuth(authOptions)






export { handler as GET, handler as POST }
16 changes: 8 additions & 8 deletions apps/merchant-app/app/api/user/route.ts
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import { NextResponse } from "next/server"
import { PrismaClient } from "@repo/db/client";
import client from "@repo/db/client";

const client = new PrismaClient();
// const client = new PrismaClient();

export const GET = async () => {
await client.user.create({
data: {
email: "asd",
name: "adsads"
}
})
// await client.user.create({
// data: {
// email: "asd",
// name: "adsads"
// }
// })
return NextResponse.json({
message: "hi there"
})
Expand Down
6 changes: 3 additions & 3 deletions apps/merchant-app/app/page.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
"use client";

import { useBalance } from "@repo/store/balance";
// import { useBalance } from "@repo/store/balance";

export default function() {
const balance = useBalance();
// const balance = useBalance();
return <div>
hi there {balance}
hi there {0}
</div>
}
2 changes: 1 addition & 1 deletion apps/merchant-app/lib/auth.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import GoogleProvider from "next-auth/providers/google";
import db from "@repo/db/client";

export const authOptions = {
export const authOptions:any = {
providers: [
GoogleProvider({
clientId: process.env.GOOGLE_CLIENT_ID || "",
Expand Down