Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
realChat
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
tkach-as
realChat
Commits
149e870e
Commit
149e870e
authored
2 years ago
by
tkach-as
Browse files
Options
Downloads
Patches
Plain Diff
feat: changed prisma
parent
31872e55
Branches
master
No related tags found
No related merge requests found
Pipeline
#72549
failed
2 years ago
Stage: build
Stage: test
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/components/Auth/Auth.tsx
+3
-3
3 additions, 3 deletions
src/components/Auth/Auth.tsx
src/prisma/schema.prisma
+2
-2
2 additions, 2 deletions
src/prisma/schema.prisma
with
5 additions
and
5 deletions
src/components/Auth/Auth.tsx
+
3
−
3
View file @
149e870e
...
@@ -24,17 +24,17 @@ const Auth: React.FC<AuthProps> = ({ session, reloadSession }) => {
...
@@ -24,17 +24,17 @@ const Auth: React.FC<AuthProps> = ({ session, reloadSession }) => {
if
(
!
username
)
return
if
(
!
username
)
return
try
{
try
{
debugger
const
{
data
}
=
await
createUsername
({
const
{
data
}
=
await
createUsername
({
variables
:
{
variables
:
{
username
,
username
,
},
},
})
})
if
(
!
data
?.
createUsername
)
{
if
(
!
data
?.
createUsername
)
{
throw
new
Error
()
throw
new
Error
()
}
}
if
(
data
.
createUsername
.
error
)
{
if
(
data
.
createUsername
.
error
)
{
debugger
const
{
const
{
createUsername
:
{
error
},
createUsername
:
{
error
},
}
=
data
}
=
data
...
@@ -83,7 +83,7 @@ const Auth: React.FC<AuthProps> = ({ session, reloadSession }) => {
...
@@ -83,7 +83,7 @@ const Auth: React.FC<AuthProps> = ({ session, reloadSession }) => {
<
Button
<
Button
onClick
=
{
(
e
)
=>
{
onClick
=
{
(
e
)
=>
{
e
.
preventDefault
()
e
.
preventDefault
()
signIn
(
'
google
'
,
{
callbackUrl
:
process
.
env
.
NEXTAUTH_URL
})
signIn
(
'
google
'
,
{
callbackUrl
:
'
http://localhost:3000
'
})
}
}
}
}
leftIcon
=
{
leftIcon
=
{
<
Image
<
Image
...
...
This diff is collapsed.
Click to expand it.
src/prisma/schema.prisma
+
2
−
2
View file @
149e870e
...
@@ -42,8 +42,8 @@ model User {
...
@@ -42,8 +42,8 @@ model User {
username String? @unique
username String? @unique
accounts Account[]
accounts Account[]
sessions Session[]
sessions Session[]
createdAt DateTime @default(now())
//
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
//
updatedAt DateTime @updatedAt
}
}
model VerificationToken {
model VerificationToken {
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment