all repos — snow-editor @ 65993a713586363acceab129af67161a5fbe71cc

small and cozy markdown, and orgmode editor

backend/src/messages.js (view raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
export const MSG = {
  NOT_FOUND: 'Document not found.',
  EXPIRED: 'This link has expired.',
  INVALID_MODE: 'Invalid mode. Use markdown or org.',
  INVALID_CONTENT: 'Invalid content.',
  CONTENT_TOO_LARGE: 'Document is larger than 1 MB.',
  INVALID_EXPIRES_IN: 'Invalid validity. Use 1h, 24h, 7d, 30d, or never.',
  INVALID_CLIENT: 'clientId is required.',
  INVALID_REQUEST: 'clientId and lockToken are required.',
  DOCUMENT_LOCKED: 'This document is being edited by someone else.',
  LOCK_INVALID: 'Edit lock not found or expired.',
  LOCK_REQUIRED: 'You need an active edit lock to save.',
  RATE_LIMIT: 'Too many requests. Try again in a minute.',
  INVALID_JSON: 'Invalid JSON in request body.',
  INTERNAL_ERROR: 'Internal server error.',
  ORIGIN_NOT_ALLOWED:
    'Document creation is only allowed from the Snow Editor website.',
  VERSION_NOT_FOUND: 'Version not found.',
};

export const APP_VERSION = '0.0.1';
export const MAX_VERSIONS_PER_DOCUMENT = 50;

export const DEFAULT_DOCUMENT_TITLE = 'Untitled document';