mirror of
				https://github.com/TheAnachronism/docspell.git
				synced 2025-10-31 09:30:12 +00:00 
			
		
		
		
	Add route to remove tags for a single item
This commit is contained in:
		| @@ -1727,6 +1727,31 @@ paths: | |||||||
|               schema: |               schema: | ||||||
|                 $ref: "#/components/schemas/BasicResult" |                 $ref: "#/components/schemas/BasicResult" | ||||||
|  |  | ||||||
|  |   /sec/item/{id}/tagsremove: | ||||||
|  |     post: | ||||||
|  |       operationId: "sec-item-remove-tags" | ||||||
|  |       tags: [ Item ] | ||||||
|  |       summary: Remove tags from an item | ||||||
|  |       description: | | ||||||
|  |         Remove the given tags from the item. The tags can be specified | ||||||
|  |         via ids or names. | ||||||
|  |       security: | ||||||
|  |         - authTokenHeader: [] | ||||||
|  |       parameters: | ||||||
|  |         - $ref: "#/components/parameters/id" | ||||||
|  |       requestBody: | ||||||
|  |         content: | ||||||
|  |           application/json: | ||||||
|  |             schema: | ||||||
|  |               $ref: "#/components/schemas/StringList" | ||||||
|  |       responses: | ||||||
|  |         200: | ||||||
|  |           description: Ok | ||||||
|  |           content: | ||||||
|  |             application/json: | ||||||
|  |               schema: | ||||||
|  |                 $ref: "#/components/schemas/BasicResult" | ||||||
|  |  | ||||||
|   /sec/item/{id}/direction: |   /sec/item/{id}/direction: | ||||||
|     put: |     put: | ||||||
|       operationId: "sec-item-set-direction" |       operationId: "sec-item-set-direction" | ||||||
|   | |||||||
| @@ -173,6 +173,17 @@ object ItemRoutes { | |||||||
|           resp <- Ok(Conversions.basicResult(res, "Tags linked")) |           resp <- Ok(Conversions.basicResult(res, "Tags linked")) | ||||||
|         } yield resp |         } yield resp | ||||||
|  |  | ||||||
|  |       case req @ POST -> Root / Ident(id) / "tagsremove" => | ||||||
|  |         for { | ||||||
|  |           json <- req.as[StringList] | ||||||
|  |           res <- backend.item.removeTagsMultipleItems( | ||||||
|  |             NonEmptyList.of(id), | ||||||
|  |             json.items, | ||||||
|  |             user.account.collective | ||||||
|  |           ) | ||||||
|  |           resp <- Ok(Conversions.basicResult(res, "Tags removed")) | ||||||
|  |         } yield resp | ||||||
|  |  | ||||||
|       case req @ PUT -> Root / Ident(id) / "direction" => |       case req @ PUT -> Root / Ident(id) / "direction" => | ||||||
|         for { |         for { | ||||||
|           dir <- req.as[DirectionValue] |           dir <- req.as[DirectionValue] | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user