Browse Source

Move interfaces

* AdminData
pull/100/head
Thomas 4 years ago
parent
commit
2d8ce2347f
  1. 2
      apps/api/src/app/admin/admin.controller.ts
  2. 3
      apps/api/src/app/admin/admin.service.ts
  3. 3
      apps/client/src/app/pages/admin/admin-page.component.ts
  4. 2
      apps/client/src/app/services/data.service.ts
  5. 2
      apps/client/src/polyfills.ts
  6. 0
      libs/helper/src/lib/interfaces/admin-data.interface.ts
  7. 2
      libs/helper/src/lib/interfaces/index.ts

2
apps/api/src/app/admin/admin.controller.ts

@ -1,5 +1,6 @@
import { RequestWithUser } from '@ghostfolio/api/app/interfaces/request-with-user.type';
import { DataGatheringService } from '@ghostfolio/api/services/data-gathering.service';
import { AdminData } from '@ghostfolio/helper/interfaces';
import {
getPermissions,
hasPermission,
@ -18,7 +19,6 @@ import { AuthGuard } from '@nestjs/passport';
import { StatusCodes, getReasonPhrase } from 'http-status-codes';
import { AdminService } from './admin.service';
import { AdminData } from './interfaces/admin-data.interface';
@Controller('admin')
export class AdminController {

3
apps/api/src/app/admin/admin.service.ts

@ -1,10 +1,9 @@
import { ExchangeRateDataService } from '@ghostfolio/api/services/exchange-rate-data.service';
import { PrismaService } from '@ghostfolio/api/services/prisma.service';
import { AdminData } from '@ghostfolio/helper/interfaces';
import { Injectable } from '@nestjs/common';
import { Currency } from '@prisma/client';
import { AdminData } from './interfaces/admin-data.interface';
@Injectable()
export class AdminService {
public constructor(

3
apps/client/src/app/pages/admin/admin-page.component.ts

@ -1,11 +1,10 @@
import { ChangeDetectorRef, Component, OnInit } from '@angular/core';
import { AdminData } from '@ghostfolio/api/app/admin/interfaces/admin-data.interface';
import { AdminService } from '@ghostfolio/client/services/admin.service';
import { CacheService } from '@ghostfolio/client/services/cache.service';
import { DataService } from '@ghostfolio/client/services/data.service';
import { TokenStorageService } from '@ghostfolio/client/services/token-storage.service';
import { DEFAULT_DATE_FORMAT } from '@ghostfolio/helper/config';
import { User } from '@ghostfolio/helper/interfaces';
import { AdminData, User } from '@ghostfolio/helper/interfaces';
import { formatDistanceToNow, isValid, parseISO, sub } from 'date-fns';
import { Subject } from 'rxjs';
import { takeUntil } from 'rxjs/operators';

2
apps/client/src/app/services/data.service.ts

@ -4,7 +4,6 @@ import { HttpClient } from '@angular/common/http';
import { Injectable } from '@angular/core';
import { CreateAccountDto } from '@ghostfolio/api/app/account/create-account.dto';
import { UpdateAccountDto } from '@ghostfolio/api/app/account/update-account.dto';
import { AdminData } from '@ghostfolio/api/app/admin/interfaces/admin-data.interface';
import { CreateOrderDto } from '@ghostfolio/api/app/order/create-order.dto';
import { UpdateOrderDto } from '@ghostfolio/api/app/order/update-order.dto';
import {
@ -17,6 +16,7 @@ import { UserItem } from '@ghostfolio/api/app/user/interfaces/user-item.interfac
import { UpdateUserSettingsDto } from '@ghostfolio/api/app/user/update-user-settings.dto';
import {
Access,
AdminData,
InfoItem,
PortfolioItem,
PortfolioOverview,

2
apps/client/src/polyfills.ts

@ -56,9 +56,9 @@
* Zone JS is required by default for Angular itself.
*/
import 'zone.js/dist/zone'; // Included with Angular CLI.
import '@angular/localize/init';
/***************************************************************************************************
* APPLICATION IMPORTS
*/
import '@angular/localize/init';

0
apps/api/src/app/admin/interfaces/admin-data.interface.ts → libs/helper/src/lib/interfaces/admin-data.interface.ts

2
libs/helper/src/lib/interfaces/index.ts

@ -1,4 +1,5 @@
import { Access } from './access.interface';
import { AdminData } from './admin-data.interface';
import { InfoItem } from './info-item.interface';
import { PortfolioItem } from './portfolio-item.interface';
import { PortfolioOverview } from './portfolio-overview.interface';
@ -12,6 +13,7 @@ import { User } from './user.interface';
export {
Access,
AdminData,
InfoItem,
PortfolioItem,
PortfolioOverview,

Loading…
Cancel
Save