Fixed flow issues
This commit is contained in:
parent
f8a715dcef
commit
b6fa0a4a4e
@ -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;
|
||||
|
@ -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);
|
||||
|
Reference in New Issue
Block a user