Renaming assets-group to assets/group
This commit is contained in:
		
							parent
							
								
									f0398e906d
								
							
						
					
					
						commit
						4c2c6396ba
					
				@ -321,7 +321,7 @@ class Server {
 | 
			
		||||
        .get(config.MEMPOOL.API_URL_PREFIX + 'assets/icons', routes.getAllLiquidIcon)
 | 
			
		||||
        .get(config.MEMPOOL.API_URL_PREFIX + 'assets/featured', routes.$getAllFeaturedLiquidAssets)
 | 
			
		||||
        .get(config.MEMPOOL.API_URL_PREFIX + 'asset/:assetId/icon', routes.getLiquidIcon)
 | 
			
		||||
        .get(config.MEMPOOL.API_URL_PREFIX + 'asset-group/:id', routes.$getAssetGroup)
 | 
			
		||||
        .get(config.MEMPOOL.API_URL_PREFIX + 'assets/group/:id', routes.$getAssetGroup)
 | 
			
		||||
      ;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -868,7 +868,7 @@ class Routes {
 | 
			
		||||
 | 
			
		||||
  public async $getAssetGroup(req: Request, res: Response) {
 | 
			
		||||
    try {
 | 
			
		||||
      const response = await axios.get('https://mempool.space/api/v1/asset-group/' + parseInt(req.params.id, 10),
 | 
			
		||||
      const response = await axios.get('https://mempool.space/api/v1/assets/group/' + parseInt(req.params.id, 10),
 | 
			
		||||
        { responseType: 'stream', timeout: 10000 });
 | 
			
		||||
      response.data.pipe(res);
 | 
			
		||||
    } catch (e) {
 | 
			
		||||
 | 
			
		||||
@ -363,7 +363,7 @@ if (browserWindowEnv && browserWindowEnv.BASE_MODULE === 'liquid') {
 | 
			
		||||
            component: AssetComponent
 | 
			
		||||
          },
 | 
			
		||||
          {
 | 
			
		||||
            path: 'asset-group/:id',
 | 
			
		||||
            path: 'group/:id',
 | 
			
		||||
            component: AssetGroupComponent
 | 
			
		||||
          },
 | 
			
		||||
          {
 | 
			
		||||
@ -472,7 +472,7 @@ if (browserWindowEnv && browserWindowEnv.BASE_MODULE === 'liquid') {
 | 
			
		||||
                component: AssetComponent
 | 
			
		||||
              },
 | 
			
		||||
              {
 | 
			
		||||
                path: 'asset-group/:id',
 | 
			
		||||
                path: 'group/:id',
 | 
			
		||||
                component: AssetGroupComponent
 | 
			
		||||
              },
 | 
			
		||||
              {
 | 
			
		||||
 | 
			
		||||
@ -16,7 +16,7 @@
 | 
			
		||||
      <div class="card">
 | 
			
		||||
        <img class="assetIcon" [src]="'https://liquid.network/api/v1/asset/' + asset.asset_id + '/icon'">
 | 
			
		||||
        <div class="title">
 | 
			
		||||
          <a [routerLink]="['/assets/asset/', asset.asset_id]">{{ asset.name }}</a>
 | 
			
		||||
          <a [routerLink]="['/assets/asset/' | relativeUrl, asset.asset_id]">{{ asset.name }}</a>
 | 
			
		||||
        </div>
 | 
			
		||||
        <div class="ticker">{{ asset.ticker }}</div>
 | 
			
		||||
      </div>
 | 
			
		||||
 | 
			
		||||
@ -2,18 +2,18 @@
 | 
			
		||||
 | 
			
		||||
  <div class="card" *ngFor="let group of featured">
 | 
			
		||||
    <ng-template [ngIf]="group.assets" [ngIfElse]="singleAsset">
 | 
			
		||||
      <a [routerLink]="['/assets/asset-group', group.id]">
 | 
			
		||||
      <a [routerLink]="['/assets/group' | relativeUrl, group.id]">
 | 
			
		||||
        <img class="assetIcon" [src]="'https://liquid.network/api/v1/asset/' + group.assets[0] + '/icon'">
 | 
			
		||||
      </a>
 | 
			
		||||
      <div class="title"><a [routerLink]="['/assets/asset-group', group.id]">{{ group.name }}</a></div>
 | 
			
		||||
      <div class="title"><a [routerLink]="['/assets/group' | relativeUrl, group.id]">{{ group.name }}</a></div>
 | 
			
		||||
      <div class="sub-title" i18n>Group of {{ group.assets.length | number }} assets</div>
 | 
			
		||||
    </ng-template>
 | 
			
		||||
    <ng-template #singleAsset>
 | 
			
		||||
      <a [routerLink]="['/assets/asset/', group.asset]">
 | 
			
		||||
      <a [routerLink]="['/assets/asset/' | relativeUrl, group.asset]">
 | 
			
		||||
        <img class="assetIcon" [src]="'https://liquid.network/api/v1/asset/' + group.asset + '/icon'">
 | 
			
		||||
      </a>
 | 
			
		||||
      <div class="title">
 | 
			
		||||
        <a [routerLink]="['/assets/asset/', group.asset]">{{ group.name }}</a>
 | 
			
		||||
        <a [routerLink]="['/assets/asset/' | relativeUrl, group.asset]">{{ group.name }}</a>
 | 
			
		||||
      </div>
 | 
			
		||||
      <div class="ticker">{{ group.ticker }}</div>
 | 
			
		||||
    </ng-template>
 | 
			
		||||
 | 
			
		||||
@ -6,11 +6,11 @@
 | 
			
		||||
  <div class="nav-container">
 | 
			
		||||
    <ul class="nav nav-pills">
 | 
			
		||||
      <li class="nav-item">
 | 
			
		||||
        <a class="nav-link" [routerLink]="['/assets/featured']" routerLinkActive="active" i18n>Featured</a>
 | 
			
		||||
        <a class="nav-link" [routerLink]="['/assets/featured' | relativeUrl]" routerLinkActive="active" i18n>Featured</a>
 | 
			
		||||
        
 | 
			
		||||
      </li>
 | 
			
		||||
      <li class="nav-item">
 | 
			
		||||
        <a class="nav-link" [routerLink]="['/assets/all']" routerLinkActive="active" i18n>All</a>
 | 
			
		||||
        <a class="nav-link" [routerLink]="['/assets/all' | relativeUrl]" routerLinkActive="active" i18n>All</a>
 | 
			
		||||
      </li>
 | 
			
		||||
    </ul>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -122,7 +122,7 @@ export class ApiService {
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  getAssetGroup$(id: string): Observable<any> {
 | 
			
		||||
    return this.httpClient.get<any[]>(this.apiBaseUrl + this.apiBasePath + '/api/v1/asset-group/' + id);
 | 
			
		||||
    return this.httpClient.get<any[]>(this.apiBaseUrl + this.apiBasePath + '/api/v1/assets/group/' + id);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
  postTransaction$(hexPayload: string): Observable<any> {
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user