mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-25 03:06:31 -05:00
Log warnings when using hardcoded data.
Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
1906f44e74
commit
643adb7f9f
3 changed files with 16 additions and 2 deletions
7
docs/dev/2.0.md
Normal file
7
docs/dev/2.0.md
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
# 2.0 Development Hints
|
||||||
|
|
||||||
|
## Dev Setup
|
||||||
|
- Clone backend and frontend in two folders.
|
||||||
|
- Run `yarn install` in both projects
|
||||||
|
- Start the backend server in watch mode using `yarn start:dev`. The backend is then accessible on port 3000.
|
||||||
|
- Start the frontend dev server using `yarn start`. The frontend is now accessible on port 3001.
|
|
@ -1,11 +1,14 @@
|
||||||
import { Injectable } from '@nestjs/common';
|
import { Injectable, Logger } from '@nestjs/common';
|
||||||
import { HistoryEntryUpdateDto } from './history-entry-update.dto';
|
import { HistoryEntryUpdateDto } from './history-entry-update.dto';
|
||||||
import { HistoryEntryDto } from './history-entry.dto';
|
import { HistoryEntryDto } from './history-entry.dto';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class HistoryService {
|
export class HistoryService {
|
||||||
|
private readonly logger = new Logger(HistoryService.name);
|
||||||
|
|
||||||
getUserHistory(username: string): HistoryEntryDto[] {
|
getUserHistory(username: string): HistoryEntryDto[] {
|
||||||
//TODO: Use the database
|
//TODO: Use the database
|
||||||
|
this.logger.warn('Using hardcoded data!');
|
||||||
return [
|
return [
|
||||||
{
|
{
|
||||||
metadata: {
|
metadata: {
|
||||||
|
@ -44,6 +47,7 @@ export class HistoryService {
|
||||||
updateDto: HistoryEntryUpdateDto,
|
updateDto: HistoryEntryUpdateDto,
|
||||||
): HistoryEntryDto {
|
): HistoryEntryDto {
|
||||||
//TODO: Use the database
|
//TODO: Use the database
|
||||||
|
this.logger.warn('Using hardcoded data!');
|
||||||
return {
|
return {
|
||||||
metadata: {
|
metadata: {
|
||||||
alias: null,
|
alias: null,
|
||||||
|
|
|
@ -1,10 +1,13 @@
|
||||||
import { Injectable } from '@nestjs/common';
|
import { Injectable, Logger } from '@nestjs/common';
|
||||||
import { UserInfoDto } from './user-info.dto';
|
import { UserInfoDto } from './user-info.dto';
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class UsersService {
|
export class UsersService {
|
||||||
|
private readonly logger = new Logger(UsersService.name);
|
||||||
|
|
||||||
getUserInfo(): UserInfoDto {
|
getUserInfo(): UserInfoDto {
|
||||||
//TODO: Use the database
|
//TODO: Use the database
|
||||||
|
this.logger.warn('Using hardcoded data!');
|
||||||
return {
|
return {
|
||||||
displayName: 'foo',
|
displayName: 'foo',
|
||||||
userName: 'fooUser',
|
userName: 'fooUser',
|
||||||
|
|
Loading…
Reference in a new issue