Improve code quality and add comments

This commit is contained in:
kevinpauer
2022-05-08 19:52:08 +02:00
parent a2b4686528
commit 0fc9e8d37f
10 changed files with 66 additions and 10 deletions

View File

@@ -14,6 +14,7 @@ export class AuthService {
constructor(private http: HttpClient) {}
/**
* Function to login user
* @param {string} email
* @param {string} password
* @returns Observable
@@ -26,6 +27,7 @@ export class AuthService {
}
/**
* Function to register user
* @param {string} email
* @param {string} username
* @param {string} password

View File

@@ -15,6 +15,7 @@ export class BotService {
) {}
/**
* Function to get all keywords
* @returns Observable
*/
public getKeywords(): Observable<any> {
@@ -28,6 +29,7 @@ export class BotService {
}
/**
* Function to create a keyword
* @param {string} keyword
* @returns Observable
*/
@@ -47,6 +49,7 @@ export class BotService {
}
/**
* Function to delete a keyword
* @param {string} keyword
* @returns Observable
*/
@@ -63,6 +66,7 @@ export class BotService {
}
/**
* Function to get all shares
* @returns Observable
*/
public getSymbols(): Observable<any> {
@@ -76,6 +80,7 @@ export class BotService {
}
/**
* Function to create a share
* @param {string} keyword
* @returns Observable
*/
@@ -96,6 +101,7 @@ export class BotService {
}
/**
* Function to delete a share
* @param {string} symbol
* @returns Observable
*/

View File

@@ -17,6 +17,7 @@ export class DataService {
) {}
/**
* Function to get all portfolio data
* @returns Observable
*/
public getStockData(): Observable<any> {
@@ -30,6 +31,7 @@ export class DataService {
}
/**
* Function to get all transaction data
* @returns Observable
*/
public getTransactionData(): Observable<any> {
@@ -43,6 +45,7 @@ export class DataService {
}
/**
* Function to create a transaction
* @param {string} symbol
* @param {Date} time
* @param {number} count
@@ -77,6 +80,7 @@ export class DataService {
}
/**
* Function to get all keywords
* @returns Observable
*/
public getKeywords(): Observable<any> {

View File

@@ -15,6 +15,7 @@ export class ProfileService {
) {}
/**
* Function to get all Userdata
* @returns Observable
*/
public getUserData(): Observable<any> {
@@ -28,6 +29,7 @@ export class ProfileService {
}
/**
* Function to update user profile
* @param {string} username
* @param {number} password
* @returns Observable
@@ -49,6 +51,7 @@ export class ProfileService {
}
/**
* Function to add a telegram id
* @param {string} telegramUserID
* @returns Observable
*/
@@ -68,6 +71,7 @@ export class ProfileService {
}
/**
* Function to add a cron string for automatic updates
* @param {string} cronString
* @returns Observable
*/

View File

@@ -8,6 +8,7 @@ export class TokenStorageService {
constructor() {}
/**
* Function to sign out user
* @returns void
*/
signOut(): void {
@@ -15,6 +16,7 @@ export class TokenStorageService {
}
/**
* Function to save token
* @param {string} token
* @returns void
*/
@@ -24,6 +26,7 @@ export class TokenStorageService {
}
/**
* Function to get token
* @returns string
*/
public getToken(): string | null {
@@ -31,6 +34,7 @@ export class TokenStorageService {
}
/**
* Function to save user
* @param {any} user
* @returns void
*/
@@ -40,6 +44,7 @@ export class TokenStorageService {
}
/**
* Function to get user
* @returns any
*/
public getUser(): any {