File tree Expand file tree Collapse file tree 2 files changed +0
-27
lines changed
Expand file tree Collapse file tree 2 files changed +0
-27
lines changed Original file line number Diff line number Diff line change @@ -39,23 +39,4 @@ export class SvgService {
3939 throw error ;
4040 }
4141 }
42-
43- private generateSimpleSvg ( data : any , assets : string ) : string {
44- return `<svg width="400" height="120" xmlns="http://www.w3.org/2000/svg">
45- <rect width="400" height="120" fill="#1E1E1E"/>
46- <text x="20" y="40" fill="white" font-size="20">${ data . username } </text>
47- <text x="20" y="70" fill="white">Views: ${ data . total_views } </text>
48- <text x="20" y="100" fill="white">Likes: ${ data . total_likes } </text>
49- </svg>` ;
50- }
51-
52- private generateDefaultSvg ( data : any , assets : string , withRank : boolean ) : string {
53- return `<svg width="600" height="300" xmlns="http://www.w3.org/2000/svg">
54- <rect width="600" height="300" fill="#1E1E1E"/>
55- <text x="20" y="30" fill="white" font-size="18">${ data . username } </text>
56- <text x="20" y="60" fill="white">Views: ${ data . total_views } </text>
57- <text x="20" y="90" fill="white">Recent Posts: ${ data . recent_posts ?. length || 0 } </text>
58- ${ withRank ? `<text x="20" y="120" fill="white">Rank: #${ data . view_rank || 'N/A' } </text>` : '' }
59- </svg>` ;
60- }
6142}
Original file line number Diff line number Diff line change @@ -15,14 +15,6 @@ export class GetSvgBadgeQueryDto {
1515 @IsEnum ( [ 'default' , 'simple' ] )
1616 type ?: SvgBadgeType ;
1717
18- @IsOptional ( )
19- @IsString ( )
20- assets ?: string ;
21-
22- @IsOptional ( )
23- @IsEnum ( [ 'true' , 'false' ] )
24- withrank ?: string ;
25-
2618 constructor ( type ?: SvgBadgeType ) {
2719 this . type = type || 'default' ;
2820 }
You can’t perform that action at this time.
0 commit comments