Skip to content

Commit

Permalink
fix: fixed github id insert type
Browse files Browse the repository at this point in the history
  • Loading branch information
SamCaliman committed Jul 4, 2024
1 parent 62490af commit eca48ed
Show file tree
Hide file tree
Showing 5 changed files with 110 additions and 110 deletions.
156 changes: 78 additions & 78 deletions api/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions api/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"author": "",
"license": "ISC",
"dependencies": {
"aeria": "^0.0.133",
"aeria-sdk": "^0.0.107"
"aeria": "^0.0.135",
"aeria-sdk": "^0.0.109"
}
}
14 changes: 7 additions & 7 deletions api/src/routes/github.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { createRouter } from 'aeria'
import { authenticate } from 'aeria-sdk';

export const githubRouter = createRouter()

Expand Down Expand Up @@ -47,7 +48,7 @@ githubRouter.POST('/githubAuth', async(context)=>{

const { error: userError ,result: userResult } = await context.collections.user.functions.get({
filters: {
github_id: gitTempUser.id,
github_id: gitTempUser.id.toString(),
},
})

Expand All @@ -59,8 +60,8 @@ githubRouter.POST('/githubAuth', async(context)=>{
what: {
name: gitTempUser.login,
active: true,
github_id: gitUserId,
roles: <any[]>['root'] as any,
github_id: gitUserId.toString(),
roles: ['root'],
email: `${gitTempUser.login}@user.github.com`,
},
})
Expand All @@ -70,12 +71,11 @@ githubRouter.POST('/githubAuth', async(context)=>{
console.log(userInsertResult)
}
if (userResult){
console.log(gitTempUser)
//console.log(userResult)
//console.log(gitTempUser)
console.log(userResult)
}

authenticate()
//console.log(gitTempUser.id)

} catch (error) {
console.log('err', error)
}
Expand Down
Loading

0 comments on commit eca48ed

Please sign in to comment.