File tree Expand file tree Collapse file tree 8 files changed +34
-35
lines changed
apps/dokploy/server/api/routers Expand file tree Collapse file tree 8 files changed +34
-35
lines changed Original file line number Diff line number Diff line change @@ -1051,9 +1051,7 @@ export const applicationRouter = createTRPCRouter({
10511051 }
10521052
10531053 if ( input . name ?. trim ( ) ) {
1054- baseConditions . push (
1055- ilike ( applications . name , `%${ input . name . trim ( ) } %` ) ,
1056- ) ;
1054+ baseConditions . push ( ilike ( applications . name , `%${ input . name . trim ( ) } %` ) ) ;
10571055 }
10581056 if ( input . appName ?. trim ( ) ) {
10591057 baseConditions . push (
@@ -1062,7 +1060,10 @@ export const applicationRouter = createTRPCRouter({
10621060 }
10631061 if ( input . description ?. trim ( ) ) {
10641062 baseConditions . push (
1065- ilike ( applications . description ?? "" , `%${ input . description . trim ( ) } %` ) ,
1063+ ilike (
1064+ applications . description ?? "" ,
1065+ `%${ input . description . trim ( ) } %` ,
1066+ ) ,
10661067 ) ;
10671068 }
10681069 if ( input . repository ?. trim ( ) ) {
@@ -1077,7 +1078,10 @@ export const applicationRouter = createTRPCRouter({
10771078 }
10781079 if ( input . dockerImage ?. trim ( ) ) {
10791080 baseConditions . push (
1080- ilike ( applications . dockerImage ?? "" , `%${ input . dockerImage . trim ( ) } %` ) ,
1081+ ilike (
1082+ applications . dockerImage ?? "" ,
1083+ `%${ input . dockerImage . trim ( ) } %` ,
1084+ ) ,
10811085 ) ;
10821086 }
10831087
Original file line number Diff line number Diff line change @@ -1097,9 +1097,7 @@ export const composeRouter = createTRPCRouter({
10971097 }
10981098
10991099 if ( input . name ?. trim ( ) ) {
1100- baseConditions . push (
1101- ilike ( composeTable . name , `%${ input . name . trim ( ) } %` ) ,
1102- ) ;
1100+ baseConditions . push ( ilike ( composeTable . name , `%${ input . name . trim ( ) } %` ) ) ;
11031101 }
11041102 if ( input . appName ?. trim ( ) ) {
11051103 baseConditions . push (
@@ -1108,7 +1106,10 @@ export const composeRouter = createTRPCRouter({
11081106 }
11091107 if ( input . description ?. trim ( ) ) {
11101108 baseConditions . push (
1111- ilike ( composeTable . description ?? "" , `%${ input . description . trim ( ) } %` ) ,
1109+ ilike (
1110+ composeTable . description ?? "" ,
1111+ `%${ input . description . trim ( ) } %` ,
1112+ ) ,
11121113 ) ;
11131114 }
11141115
Original file line number Diff line number Diff line change @@ -393,13 +393,14 @@ export const environmentRouter = createTRPCRouter({
393393 }
394394
395395 if ( input . name ?. trim ( ) ) {
396- baseConditions . push (
397- ilike ( environments . name , `%${ input . name . trim ( ) } %` ) ,
398- ) ;
396+ baseConditions . push ( ilike ( environments . name , `%${ input . name . trim ( ) } %` ) ) ;
399397 }
400398 if ( input . description ?. trim ( ) ) {
401399 baseConditions . push (
402- ilike ( environments . description ?? "" , `%${ input . description . trim ( ) } %` ) ,
400+ ilike (
401+ environments . description ?? "" ,
402+ `%${ input . description . trim ( ) } %` ,
403+ ) ,
403404 ) ;
404405 }
405406
@@ -408,8 +409,7 @@ export const environmentRouter = createTRPCRouter({
408409 ctx . user . id ,
409410 ctx . session . activeOrganizationId ,
410411 ) ;
411- if ( accessedEnvironments . length === 0 )
412- return { items : [ ] , total : 0 } ;
412+ if ( accessedEnvironments . length === 0 ) return { items : [ ] , total : 0 } ;
413413 baseConditions . push (
414414 sql `${ environments . environmentId } IN (${ sql . join (
415415 accessedEnvironments . map ( ( id ) => sql `${ id } ` ) ,
Original file line number Diff line number Diff line change @@ -484,9 +484,7 @@ export const mariadbRouter = createTRPCRouter({
484484 ) ;
485485 }
486486 if ( input . name ?. trim ( ) ) {
487- baseConditions . push (
488- ilike ( mariadbTable . name , `%${ input . name . trim ( ) } %` ) ,
489- ) ;
487+ baseConditions . push ( ilike ( mariadbTable . name , `%${ input . name . trim ( ) } %` ) ) ;
490488 }
491489 if ( input . appName ?. trim ( ) ) {
492490 baseConditions . push (
@@ -495,7 +493,10 @@ export const mariadbRouter = createTRPCRouter({
495493 }
496494 if ( input . description ?. trim ( ) ) {
497495 baseConditions . push (
498- ilike ( mariadbTable . description ?? "" , `%${ input . description . trim ( ) } %` ) ,
496+ ilike (
497+ mariadbTable . description ?? "" ,
498+ `%${ input . description . trim ( ) } %` ,
499+ ) ,
499500 ) ;
500501 }
501502 if ( ctx . user . role === "member" ) {
Original file line number Diff line number Diff line change @@ -499,9 +499,7 @@ export const mongoRouter = createTRPCRouter({
499499 baseConditions . push ( eq ( environments . projectId , input . projectId ) ) ;
500500 }
501501 if ( input . environmentId ) {
502- baseConditions . push (
503- eq ( mongoTable . environmentId , input . environmentId ) ,
504- ) ;
502+ baseConditions . push ( eq ( mongoTable . environmentId , input . environmentId ) ) ;
505503 }
506504 if ( input . q ?. trim ( ) ) {
507505 const term = `%${ input . q . trim ( ) } %` ;
@@ -514,9 +512,7 @@ export const mongoRouter = createTRPCRouter({
514512 ) ;
515513 }
516514 if ( input . name ?. trim ( ) ) {
517- baseConditions . push (
518- ilike ( mongoTable . name , `%${ input . name . trim ( ) } %` ) ,
519- ) ;
515+ baseConditions . push ( ilike ( mongoTable . name , `%${ input . name . trim ( ) } %` ) ) ;
520516 }
521517 if ( input . appName ?. trim ( ) ) {
522518 baseConditions . push (
Original file line number Diff line number Diff line change @@ -508,9 +508,7 @@ export const mysqlRouter = createTRPCRouter({
508508 ) ;
509509 }
510510 if ( input . name ?. trim ( ) ) {
511- baseConditions . push (
512- ilike ( mysqlTable . name , `%${ input . name . trim ( ) } %` ) ,
513- ) ;
511+ baseConditions . push ( ilike ( mysqlTable . name , `%${ input . name . trim ( ) } %` ) ) ;
514512 }
515513 if ( input . appName ?. trim ( ) ) {
516514 baseConditions . push (
Original file line number Diff line number Diff line change @@ -532,7 +532,10 @@ export const postgresRouter = createTRPCRouter({
532532 }
533533 if ( input . description ?. trim ( ) ) {
534534 baseConditions . push (
535- ilike ( postgresTable . description ?? "" , `%${ input . description . trim ( ) } %` ) ,
535+ ilike (
536+ postgresTable . description ?? "" ,
537+ `%${ input . description . trim ( ) } %` ,
538+ ) ,
536539 ) ;
537540 }
538541 if ( ctx . user . role === "member" ) {
Original file line number Diff line number Diff line change @@ -473,9 +473,7 @@ export const redisRouter = createTRPCRouter({
473473 baseConditions . push ( eq ( environments . projectId , input . projectId ) ) ;
474474 }
475475 if ( input . environmentId ) {
476- baseConditions . push (
477- eq ( redisTable . environmentId , input . environmentId ) ,
478- ) ;
476+ baseConditions . push ( eq ( redisTable . environmentId , input . environmentId ) ) ;
479477 }
480478 if ( input . q ?. trim ( ) ) {
481479 const term = `%${ input . q . trim ( ) } %` ;
@@ -488,9 +486,7 @@ export const redisRouter = createTRPCRouter({
488486 ) ;
489487 }
490488 if ( input . name ?. trim ( ) ) {
491- baseConditions . push (
492- ilike ( redisTable . name , `%${ input . name . trim ( ) } %` ) ,
493- ) ;
489+ baseConditions . push ( ilike ( redisTable . name , `%${ input . name . trim ( ) } %` ) ) ;
494490 }
495491 if ( input . appName ?. trim ( ) ) {
496492 baseConditions . push (
You can’t perform that action at this time.
0 commit comments