Skip to content

Commit

Permalink
Remove repetition (#432)
Browse files Browse the repository at this point in the history
* Remove repetition and digest

* Document change

* Fix test

* Fix test
  • Loading branch information
Sung Won Cho committed Mar 21, 2020
1 parent b2da22a commit a9f052b
Show file tree
Hide file tree
Showing 124 changed files with 37 additions and 9,847 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Expand Up @@ -12,6 +12,7 @@ before_install:
- sudo apt-get --yes remove postgresql\*
- sudo apt-get install -y postgresql-11 postgresql-client-11
- sudo cp /etc/postgresql/{9.6,11}/main/pg_hba.conf
- sudo sed -i 's/port = 5433/port = 5432/' /etc/postgresql/11/main/postgresql.conf
- sudo service postgresql restart 11

before_script:
Expand Down
4 changes: 4 additions & 0 deletions CHANGELOG.md
Expand Up @@ -10,6 +10,10 @@ All notable changes to the projects under this repository will be documented in

The following log documents the history of the server project.

### Unreleased

- Remove the deprecated features related to digests and repetition rules.

### 0.5.0 - 2020-02-06

#### Changed
Expand Down
34 changes: 0 additions & 34 deletions jslib/src/operations/digests.ts

This file was deleted.

5 changes: 1 addition & 4 deletions jslib/src/operations/index.ts
Expand Up @@ -19,18 +19,15 @@
import { HttpClientConfig } from '../helpers/http';
import initBooksOperation from './books';
import initNotesOperation from './notes';
import initDigestsOperation from './digests';

// init initializes operations with the given http configuration
// and returns an object of all services.
export default function initOperations(c: HttpClientConfig) {
const booksOperation = initBooksOperation(c);
const notesOperation = initNotesOperation(c);
const digestsOperation = initDigestsOperation(c);

return {
books: booksOperation,
notes: notesOperation,
digests: digestsOperation
notes: notesOperation
};
}
46 changes: 0 additions & 46 deletions jslib/src/operations/types.ts
Expand Up @@ -56,49 +56,3 @@ export type BookData = {
updated_at: string;
label: string;
};

// BookDomain is the possible values for the field in the repetition_rule
// indicating how to derive the source books for the repetition_rule.
export enum BookDomain {
// All incidates that all books are eligible to be the source books
All = 'all',
// Including incidates that some specified books are eligible to be the source books
Including = 'including',
// Excluding incidates that all books except for some specified books are eligible to be the source books
Excluding = 'excluding'
}

export interface RepetitionRuleData {
uuid: string;
title: string;
enabled: boolean;
hour: number;
minute: number;
bookDomain: BookDomain;
frequency: number;
books: BookData[];
lastActive: number;
nextActive: number;
noteCount: number;
createdAt: string;
updatedAt: string;
}

export interface ReceiptData {
createdAt: string;
updatedAt: string;
}

export interface DigestData {
uuid: string;
createdAt: string;
updatedAt: string;
version: number;
notes: DigestNoteData[];
isRead: boolean;
repetitionRule: RepetitionRuleData;
}

export interface DigestNoteData extends NoteData {
isReviewed: boolean;
}
88 changes: 0 additions & 88 deletions jslib/src/services/digests.ts

This file was deleted.

11 changes: 1 addition & 10 deletions jslib/src/services/index.ts
Expand Up @@ -21,9 +21,6 @@ import initUsersService from './users';
import initBooksService from './books';
import initNotesService from './notes';
import initPaymentService from './payment';
import initDigestsService from './digests';
import initRepetitionRulesService from './repetitionRules';
import initNoteReviews from './noteReviews';

// init initializes service helpers with the given http configuration
// and returns an object of all services.
Expand All @@ -32,17 +29,11 @@ export default function initServices(c: HttpClientConfig) {
const booksService = initBooksService(c);
const notesService = initNotesService(c);
const paymentService = initPaymentService(c);
const digestsService = initDigestsService(c);
const repetitionRulesService = initRepetitionRulesService(c);
const noteReviewsService = initNoteReviews(c);

return {
users: usersService,
books: booksService,
notes: notesService,
payment: paymentService,
digests: digestsService,
repetitionRules: repetitionRulesService,
noteReviews: noteReviewsService
payment: paymentService
};
}
56 changes: 0 additions & 56 deletions jslib/src/services/noteReviews.ts

This file was deleted.

94 changes: 0 additions & 94 deletions jslib/src/services/repetitionRules.ts

This file was deleted.

0 comments on commit a9f052b

Please sign in to comment.