add tests

This commit is contained in:
Marin Postma 2021-04-19 19:03:53 +02:00
parent c6bb36efa5
commit 881b099c8e
No known key found for this signature in database
GPG key ID: D5241F0C0C865F30
2 changed files with 135 additions and 15 deletions

View file

@ -1,7 +1,6 @@
use actix_web::{delete, get, post, put};
use actix_web::{web, HttpResponse};
use chrono::{DateTime, Utc};
use serde::{Deserialize, Serialize};
use serde::Deserialize;
use crate::error::ResponseError;
use crate::helpers::Authentication;
@ -69,16 +68,6 @@ struct UpdateIndexRequest {
primary_key: Option<String>,
}
#[derive(Debug, Serialize)]
#[serde(rename_all = "camelCase")]
struct UpdateIndexResponse {
name: String,
uid: String,
created_at: DateTime<Utc>,
updated_at: DateTime<Utc>,
primary_key: Option<String>,
}
#[put("/indexes/{index_uid}", wrap = "Authentication::Private")]
async fn update_index(
data: web::Data<Data>,