Worked on the note endpoint and helpers, ready for response and testing

This commit is contained in:
Ben
2018-09-25 13:59:58 +01:00
parent bff3461278
commit 30fac3ff13
5 changed files with 37 additions and 8 deletions

View File

@@ -9,3 +9,4 @@ export class API extends BaseAPI {
API.errors = require('./APIErrors').APIErrors;
API.user = require('./userResponses').UserAPI;
API.permalink = require('./permaLinkResponse').PermaLinkAPI;
API.note = require('./noteResponse').NoteAPI;

View File

@@ -0,0 +1,5 @@
import {API} from './API';
export class NoteAPI extends API {
}

View File

@@ -1,3 +1,11 @@
import {Database} from '../database/database';
export class Groups {
constructor() { }
static async newGroup() {
}
static async doesGroupExist() {
}
}

View File

@@ -3,7 +3,11 @@ import {Database} from '../database/database';
export class Notes extends Groups {
static async newNote(id, content, creatorid, order) {
Database.note.newNote(id, content, creatorid, order, null);
return await Database.note.newNote(id, content, creatorid, order, null);
}
static async newGroupedNote(id, content, creatorid, order, parentgroup) {
return await Database.note.newNote(id, content, creatorid, order, parentgroup);
}
static async genID() {
@@ -34,10 +38,6 @@ export class Notes extends Groups {
}
static async newGroupedNote(id, content, creatorid, order, parentgroup) {
}
static async reorderNote(id, newPosition) {
}