From 7b45267b59d665249ac17952b4a80593d9ca50e6 Mon Sep 17 00:00:00 2001
From: mohammad <mohammad.nakhaee.1@gmail.com>
Date: Wed, 6 Oct 2021 12:08:16 +0200
Subject: [PATCH] Move POST datasets/{id}/doi to datasets/{id}/action/doi

It has been changed for both route and test
---
 nomad/app/v1/routers/datasets.py     | 2 +-
 nomad/cli/client/integrationtests.py | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/nomad/app/v1/routers/datasets.py b/nomad/app/v1/routers/datasets.py
index 3d7611e7d2..e4d04261f6 100644
--- a/nomad/app/v1/routers/datasets.py
+++ b/nomad/app/v1/routers/datasets.py
@@ -331,7 +331,7 @@ async def delete_dataset(
 
 
 @router.post(
-    '/{dataset_id}/doi', tags=[default_tag],
+    '/{dataset_id}/action/doi', tags=[default_tag],
     summary='Assign a DOI to a dataset',
     response_model=DatasetResponse,
     responses=create_responses(_bad_id_response, _dataset_is_fixed_response, _bad_user_response),
diff --git a/nomad/cli/client/integrationtests.py b/nomad/cli/client/integrationtests.py
index fdce65e1a2..e4c417ffae 100644
--- a/nomad/cli/client/integrationtests.py
+++ b/nomad/cli/client/integrationtests.py
@@ -195,7 +195,7 @@ def integrationtests(auth: api.Auth, skip_parsers: bool, skip_publish: bool, ski
 
         if not skip_doi and published:
             print('assigning a DOI')
-            response = api.post(f'datasets/{dataset_id}/doi', auth=auth)
+            response = api.post(f'datasets/{dataset_id}/action/doi', auth=auth)
             assert response.status_code == 200, response.text
             has_doi = True
 
-- 
GitLab