Fixed flow issues

This commit is contained in:
Jori Lallo 2017-06-27 20:36:09 -07:00
parent f8a715dcef
commit b6fa0a4a4e
2 changed files with 3 additions and 1 deletions

View File

@ -17,12 +17,14 @@ class Document {
html: string;
id: string;
private: boolean;
starred: boolean;
team: string;
text: string;
title: string;
updatedAt: string;
updatedBy: User;
url: string;
views: number;
client: ApiClient;
errors: ErrorsStore;

View File

@ -3,7 +3,7 @@ import apiError from '../../errors';
import validator from 'validator';
export default function validation() {
return function validationMiddleware(ctx, next) {
return function validationMiddleware(ctx: Object, next: Function) {
ctx.assertPresent = function assertPresent(value, message) {
if (value === undefined || value === null || value === '') {
throw apiError(400, 'validation_error', message);