mirror of
https://github.com/siteboon/claudecodeui.git
synced 2026-05-24 14:13:18 +00:00
refactor: restructure db logic and add import alias using tsc-alias
Note: the legacy githubTokensDb migration is not included in this commit. It's used only in `agents.js` and will be removed in a future commit. We will directly use credentials repository instead of github tokens repository.
This commit is contained in:
@@ -875,8 +875,9 @@ router.post('/', validateExternalApiKey, async (req, res) => {
|
||||
// Determine the final project path
|
||||
if (githubUrl) {
|
||||
// Clone repository (to projectPath if provided, otherwise generate path)
|
||||
// TODO: use credinitalsDB when refactoring
|
||||
const tokenToUse = githubToken || githubTokensDb.getActiveGithubToken(req.user.id);
|
||||
|
||||
|
||||
let targetPath;
|
||||
if (projectPath) {
|
||||
targetPath = projectPath;
|
||||
@@ -995,6 +996,7 @@ router.post('/', validateExternalApiKey, async (req, res) => {
|
||||
console.log('🔄 Starting GitHub branch/PR creation workflow...');
|
||||
|
||||
// Get GitHub token
|
||||
// TODO: use credinitalsDB when refactoring
|
||||
const tokenToUse = githubToken || githubTokensDb.getActiveGithubToken(req.user.id);
|
||||
|
||||
if (!tokenToUse) {
|
||||
|
||||
Reference in New Issue
Block a user