//! API endpoint handlers
use ConnectionPool;
use database_models::*;
use database_schema::{changelog, container_edit, container_ident, container_rev, creator_edit,
creator_ident, creator_rev, editgroup, editor, file_edit, file_ident,
file_rev, release_edit, release_ident, release_rev, work_edit, work_ident,
work_rev};
use diesel::prelude::*;
use diesel::{self, insert_into};
use errors::*;
use fatcat_api::models;
use fatcat_api::models::*;
use fatcat_api::{Api, ApiError, ContainerIdGetResponse, ContainerLookupGetResponse,
ContainerPostResponse, Context, CreatorIdGetResponse, CreatorLookupGetResponse,
CreatorPostResponse, EditgroupIdAcceptPostResponse, EditgroupIdGetResponse,
EditgroupPostResponse, EditorUsernameChangelogGetResponse,
EditorUsernameGetResponse, FileIdGetResponse, FileLookupGetResponse,
FilePostResponse, ReleaseIdGetResponse, ReleaseLookupGetResponse,
ReleasePostResponse, WorkIdGetResponse, WorkPostResponse};
use futures::{self, Future};
use uuid;
#[derive(Clone)]
pub struct Server {
pub db_pool: ConnectionPool,
}
impl Server {
fn container_id_get_handler(&self, id: String) -> Result