Skip to main content

create_attribute_routes

Function create_attribute_routes 

Source
pub fn create_attribute_routes(service: Arc<AttributeService>) -> Router
Expand description

Create Axum router with all 16 Backbone endpoints for Attribute.

§Routes

MethodPathDescription
GET/attributesList with pagination
POST/attributesCreate new
GET/attributes/:idGet by ID
PUT/attributes/:idFull update
PATCH/attributes/:idPartial update
DELETE/attributes/:idSoft delete
POST/attributes/bulkBulk create
POST/attributes/upsertUpsert
GET/attributes/trashList deleted
POST/attributes/:id/restoreRestore
DELETE/attributes/emptyEmpty trash
GET/attributes/:id/deletedGet deleted by ID
DELETE/attributes/trash/:idPermanent delete from trash
GET/attributes/countCount active entities
GET/attributes/trash/countCount deleted entities

§Example

let service = Arc::new(AttributeService::with_repository(repository));
let router = create_attribute_routes(service);