File tree Expand file tree Collapse file tree 30 files changed +40
-83
lines changed Expand file tree Collapse file tree 30 files changed +40
-83
lines changed Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " @dokploy/cli" ,
3
3
"description" : " A CLI to manage dokploy server remotely" ,
4
- "version" : " v0.2.6 " ,
4
+ "version" : " v0.2.7 " ,
5
5
"author" : " Mauricio Siu" ,
6
6
"licenses" : [{
7
7
"type" : " MIT" ,
Original file line number Diff line number Diff line change @@ -132,7 +132,7 @@ export default class AppCreate extends Command {
132
132
} ,
133
133
{
134
134
headers : {
135
- Authorization : `Bearer ${ auth . token } ` ,
135
+ "x-api-key" : auth . token ,
136
136
"Content-Type" : "application/json" ,
137
137
} ,
138
138
} ,
Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ export default class AppDelete extends Command {
107
107
} ,
108
108
{
109
109
headers : {
110
- Authorization : `Bearer ${ auth . token } ` ,
110
+ "x-api-key" : auth . token ,
111
111
"Content-Type" : "application/json" ,
112
112
} ,
113
113
} ,
Original file line number Diff line number Diff line change @@ -107,7 +107,7 @@ export default class AppDeploy extends Command {
107
107
} ,
108
108
{
109
109
headers : {
110
- Authorization : `Bearer ${ auth . token } ` ,
110
+ "x-api-key" : auth . token ,
111
111
"Content-Type" : "application/json" ,
112
112
} ,
113
113
} ,
Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ export default class AppStop extends Command {
102
102
} ,
103
103
{
104
104
headers : {
105
- Authorization : `Bearer ${ auth . token } ` ,
105
+ "x-api-key" : auth . token ,
106
106
"Content-Type" : "application/json" ,
107
107
} ,
108
108
} ,
Original file line number Diff line number Diff line change @@ -83,12 +83,11 @@ export default class Authenticate extends Command {
83
83
try {
84
84
console . log ( `\n${ chalk . blue ( "Validating server..." ) } ` ) ;
85
85
86
- await axios . post (
87
- `${ url } /api/trpc/auth.verifyToken` ,
88
- { } ,
86
+ await axios . get (
87
+ `${ url } /api/trpc/user.get` ,
89
88
{
90
89
headers : {
91
- Authorization : `Bearer ${ token } ` ,
90
+ "x-api-key" : token ,
92
91
"Content-Type" : "application/json" ,
93
92
} ,
94
93
} ,
@@ -104,3 +103,7 @@ export default class Authenticate extends Command {
104
103
}
105
104
}
106
105
}
106
+ // curl -X 'GET' \
107
+ // 'https://panel.jinza.app/api/project.all' \
108
+ // -H 'accept: application/json' \
109
+ // -H 'x-api-key: EawCkTREMhxoAqvCxJFZurgCGoDZPjYHHrLgUPghRjJTpXLaahFdhCOGfABZXTRP'
Original file line number Diff line number Diff line change @@ -182,17 +182,6 @@ export default class DatabaseMariadbCreate extends Command {
182
182
}
183
183
184
184
try {
185
- console . log ( JSON . stringify ( {
186
- name,
187
- databaseName,
188
- description,
189
- databaseRootPassword,
190
- databasePassword,
191
- databaseUser,
192
- dockerImage,
193
- appName,
194
- projectId,
195
- } , null , 2 ) ) ;
196
185
const response = await axios . post (
197
186
`${ auth . url } /api/trpc/mariadb.create` ,
198
187
{
@@ -210,7 +199,7 @@ export default class DatabaseMariadbCreate extends Command {
210
199
} ,
211
200
{
212
201
headers : {
213
- Authorization : `Bearer ${ auth . token } ` ,
202
+ "x-api-key" : auth . token ,
214
203
"Content-Type" : "application/json" ,
215
204
} ,
216
205
} ,
Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ export default class DatabaseMariadbDelete extends Command {
102
102
} ,
103
103
{
104
104
headers : {
105
- Authorization : `Bearer ${ auth . token } ` ,
105
+ "x-api-key" : auth . token ,
106
106
"Content-Type" : "application/json" ,
107
107
} ,
108
108
} ,
Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ export default class DatabaseMariadbDeploy extends Command {
103
103
} ,
104
104
{
105
105
headers : {
106
- Authorization : `Bearer ${ auth . token } ` ,
106
+ "x-api-key" : auth . token ,
107
107
"Content-Type" : "application/json" ,
108
108
} ,
109
109
} ,
Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ export default class DatabaseMariadbStop extends Command {
103
103
} ,
104
104
{
105
105
headers : {
106
- Authorization : `Bearer ${ auth . token } ` ,
106
+ "x-api-key" : auth . token ,
107
107
"Content-Type" : "application/json" ,
108
108
} ,
109
109
} ,
Original file line number Diff line number Diff line change @@ -186,7 +186,7 @@ export default class DatabaseMongoCreate extends Command {
186
186
} ,
187
187
{
188
188
headers : {
189
- Authorization : `Bearer ${ auth . token } ` ,
189
+ "x-api-key" : auth . token ,
190
190
"Content-Type" : "application/json" ,
191
191
} ,
192
192
} ,
Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ export default class DatabaseMongoDelete extends Command {
106
106
} ,
107
107
{
108
108
headers : {
109
- Authorization : `Bearer ${ auth . token } ` ,
109
+ "x-api-key" : auth . token ,
110
110
"Content-Type" : "application/json" ,
111
111
} ,
112
112
} ,
Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ export default class DatabaseMongoDeploy extends Command {
103
103
} ,
104
104
{
105
105
headers : {
106
- Authorization : `Bearer ${ auth . token } ` ,
106
+ "x-api-key" : auth . token ,
107
107
"Content-Type" : "application/json" ,
108
108
} ,
109
109
} ,
Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ export default class DatabaseMongoStop extends Command {
103
103
} ,
104
104
{
105
105
headers : {
106
- Authorization : `Bearer ${ auth . token } ` ,
106
+ "x-api-key" : auth . token ,
107
107
"Content-Type" : "application/json" ,
108
108
} ,
109
109
} ,
Original file line number Diff line number Diff line change @@ -183,17 +183,6 @@ export default class DatabaseMysqlCreate extends Command {
183
183
}
184
184
185
185
try {
186
- console . log ( JSON . stringify ( {
187
- name,
188
- databaseName,
189
- description,
190
- databaseRootPassword,
191
- databasePassword,
192
- databaseUser,
193
- dockerImage,
194
- appName,
195
- projectId,
196
- } , null , 2 ) ) ;
197
186
198
187
const response = await axios . post (
199
188
`${ auth . url } /api/trpc/mysql.create` ,
@@ -212,7 +201,7 @@ export default class DatabaseMysqlCreate extends Command {
212
201
} ,
213
202
{
214
203
headers : {
215
- Authorization : `Bearer ${ auth . token } ` ,
204
+ "x-api-key" : auth . token ,
216
205
"Content-Type" : "application/json" ,
217
206
} ,
218
207
} ,
Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ export default class DatabaseMysqlDelete extends Command {
106
106
} ,
107
107
{
108
108
headers : {
109
- Authorization : `Bearer ${ auth . token } ` ,
109
+ "x-api-key" : auth . token ,
110
110
"Content-Type" : "application/json" ,
111
111
} ,
112
112
} ,
Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ export default class DatabaseMysqlDeploy extends Command {
85
85
} ,
86
86
{
87
87
headers : {
88
- Authorization : `Bearer ${ auth . token } ` ,
88
+ "x-api-key" : auth . token ,
89
89
"Content-Type" : "application/json" ,
90
90
} ,
91
91
} ,
Original file line number Diff line number Diff line change @@ -85,7 +85,7 @@ export default class DatabaseMysqlStop extends Command {
85
85
} ,
86
86
{
87
87
headers : {
88
- Authorization : `Bearer ${ auth . token } ` ,
88
+ "x-api-key" : auth . token ,
89
89
"Content-Type" : "application/json" ,
90
90
} ,
91
91
} ,
Original file line number Diff line number Diff line change @@ -169,16 +169,6 @@ export default class DatabasePostgresCreate extends Command {
169
169
}
170
170
171
171
try {
172
- console . log ( JSON . stringify ( {
173
- name,
174
- databaseName,
175
- description,
176
- databasePassword,
177
- databaseUser,
178
- dockerImage,
179
- appName,
180
- projectId,
181
- } , null , 2 ) ) ;
182
172
183
173
const response = await axios . post (
184
174
`${ auth . url } /api/trpc/postgres.create` ,
@@ -196,7 +186,7 @@ export default class DatabasePostgresCreate extends Command {
196
186
} ,
197
187
{
198
188
headers : {
199
- Authorization : `Bearer ${ auth . token } ` ,
189
+ "x-api-key" : auth . token ,
200
190
"Content-Type" : "application/json" ,
201
191
} ,
202
192
} ,
Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ export default class DatabasePostgresDelete extends Command {
106
106
} ,
107
107
{
108
108
headers : {
109
- Authorization : `Bearer ${ auth . token } ` ,
109
+ "x-api-key" : auth . token ,
110
110
"Content-Type" : "application/json" ,
111
111
} ,
112
112
} ,
Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ export default class DatabasePostgresDeploy extends Command {
103
103
} ,
104
104
{
105
105
headers : {
106
- Authorization : `Bearer ${ auth . token } ` ,
106
+ "x-api-key" : auth . token ,
107
107
"Content-Type" : "application/json" ,
108
108
} ,
109
109
} ,
Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ export default class DatabasePostgresStop extends Command {
103
103
} ,
104
104
{
105
105
headers : {
106
- Authorization : `Bearer ${ auth . token } ` ,
106
+ "x-api-key" : auth . token ,
107
107
"Content-Type" : "application/json" ,
108
108
} ,
109
109
} ,
Original file line number Diff line number Diff line change @@ -145,15 +145,6 @@ export default class DatabaseRedisCreate extends Command {
145
145
}
146
146
147
147
try {
148
- console . log ( JSON . stringify ( {
149
- name,
150
- description,
151
- databasePassword,
152
- dockerImage,
153
- appName,
154
- projectId,
155
- } , null , 2 ) ) ;
156
-
157
148
const response = await axios . post (
158
149
`${ auth . url } /api/trpc/redis.create` ,
159
150
{
@@ -168,7 +159,7 @@ export default class DatabaseRedisCreate extends Command {
168
159
} ,
169
160
{
170
161
headers : {
171
- Authorization : `Bearer ${ auth . token } ` ,
162
+ "x-api-key" : auth . token ,
172
163
"Content-Type" : "application/json" ,
173
164
} ,
174
165
} ,
Original file line number Diff line number Diff line change @@ -106,7 +106,7 @@ export default class DatabaseRedisDelete extends Command {
106
106
} ,
107
107
{
108
108
headers : {
109
- Authorization : `Bearer ${ auth . token } ` ,
109
+ "x-api-key" : auth . token ,
110
110
"Content-Type" : "application/json" ,
111
111
} ,
112
112
} ,
Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ export default class DatabaseRedisDeploy extends Command {
103
103
} ,
104
104
{
105
105
headers : {
106
- Authorization : `Bearer ${ auth . token } ` ,
106
+ "x-api-key" : auth . token ,
107
107
"Content-Type" : "application/json" ,
108
108
} ,
109
109
} ,
Original file line number Diff line number Diff line change @@ -103,7 +103,7 @@ export default class DatabaseRedisStop extends Command {
103
103
} ,
104
104
{
105
105
headers : {
106
- Authorization : `Bearer ${ auth . token } ` ,
106
+ "x-api-key" : auth . token ,
107
107
"Content-Type" : "application/json" ,
108
108
} ,
109
109
} ,
Original file line number Diff line number Diff line change @@ -91,7 +91,7 @@ export default class EnvPush extends Command {
91
91
} , {
92
92
93
93
headers : {
94
- Authorization : `Bearer ${ auth . token } ` ,
94
+ "x-api-key" : auth . token ,
95
95
"Content-Type" : "application/json" ,
96
96
} ,
97
97
}
@@ -114,7 +114,7 @@ export default class EnvPush extends Command {
114
114
}
115
115
} , {
116
116
headers : {
117
- Authorization : `Bearer ${ auth . token } ` ,
117
+ "x-api-key" : auth . token ,
118
118
"Content-Type" : "application/json" ,
119
119
} ,
120
120
}
Original file line number Diff line number Diff line change @@ -75,10 +75,6 @@ export default class ProjectCreate extends Command {
75
75
}
76
76
77
77
try {
78
- console . log ( JSON . stringify ( {
79
- name,
80
- description,
81
- } , null , 2 ) ) ;
82
78
83
79
const response = await axios . post (
84
80
`${ auth . url } /api/trpc/project.create` ,
@@ -90,7 +86,7 @@ export default class ProjectCreate extends Command {
90
86
} ,
91
87
{
92
88
headers : {
93
- Authorization : `Bearer ${ auth . token } ` ,
89
+ "x-api-key" : auth . token ,
94
90
"Content-Type" : "application/json" ,
95
91
} ,
96
92
} ,
Original file line number Diff line number Diff line change @@ -58,12 +58,11 @@ export default class Verify extends Command {
58
58
try {
59
59
console . log ( chalk . blue ( "Validating token with server..." ) ) ;
60
60
61
- const response = await axios . post (
62
- `${ url } /api/trpc/auth.verifyToken` ,
63
- { } ,
61
+ const response = await axios . get (
62
+ `${ url } /api/trpc/user.get` ,
64
63
{
65
64
headers : {
66
- Authorization : `Bearer ${ token } ` ,
65
+ "x-api-key" : token ,
67
66
"Content-Type" : "application/json" ,
68
67
} ,
69
68
} ,
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ export const getProjects = async (
19
19
try {
20
20
const response = await axios . get ( `${ auth . url } /api/trpc/project.all` , {
21
21
headers : {
22
- Authorization : `Bearer ${ auth . token } ` ,
22
+ "x-api-key" : auth . token ,
23
23
"Content-Type" : "application/json" ,
24
24
} ,
25
25
} ) ;
@@ -53,7 +53,7 @@ export const getProject = async (
53
53
}
54
54
const response = await axios . get ( `${ auth . url } /api/trpc/project.one` , {
55
55
headers : {
56
- Authorization : `Bearer ${ auth . token } ` ,
56
+ "x-api-key" : auth . token ,
57
57
"Content-Type" : "application/json" ,
58
58
} ,
59
59
params : {
You can’t perform that action at this time.
0 commit comments