feat: update authentication method to use x-api-key header

- Replace Bearer token authentication with x-api-key header across all commands
- Update token verification endpoints from auth.verifyToken to user.get
- Remove unnecessary console.log debug statements
- Bump version to v0.2.7
This commit is contained in:
Mauricio Siu
2025-03-04 00:13:51 -06:00
parent 21dd3f0b53
commit 82aed684b9
30 changed files with 40 additions and 83 deletions

View File

@@ -75,10 +75,6 @@ export default class ProjectCreate extends Command {
}
try {
console.log(JSON.stringify({
name,
description,
}, null, 2));
const response = await axios.post(
`${auth.url}/api/trpc/project.create`,
@@ -90,7 +86,7 @@ export default class ProjectCreate extends Command {
},
{
headers: {
Authorization: `Bearer ${auth.token}`,
"x-api-key": auth.token,
"Content-Type": "application/json",
},
},