lintel 0.2.0
Loading...
Searching...
No Matches
PropertyController.h
Go to the documentation of this file.
1#ifndef LINTEL_PROPERTYCONTROLLER_H
2#define LINTEL_PROPERTYCONTROLLER_H
3
8
9namespace lintel {
12{
13private:
14 std::shared_ptr<PropertyService> m_propertyService;
15 std::shared_ptr<IHistoryService> m_historyService;
16 Group m_adminGroup;
17 Group m_userGroup;
18 ADD_HANDLER_METHOD(R"(/properties/([^\/]+)/([^\/]+)/([^\/]+))", Get, allPropertiesOf);
19
20 ADD_HANDLER_METHOD(R"(/properties/([^\/]+)/([^\/]+)/([^\/]+)/([^\/]+))", Get, propertyOf);
21
22 ADD_HANDLER_METHOD(R"(/properties/([^\/]+)/([^\/]+)/([^\/]+)/([^\/]+))", Put, updateProperty);
23
24public:
25 explicit PropertyController(std::shared_ptr<PropertyService> propertyService,
26 const std::shared_ptr<IAuthService> &authService,
27 std::shared_ptr<IHistoryService> historyService);
28};
29
30}// namespace lintel
31#endif// LINTEL_PROPERTYCONTROLLER_H
#define ADD_HANDLER_METHOD(pattern, httpType, name)
Definition Controller.h:25
Definition Controller.h:90
@ Get
Definition Controller.h:121
@ Put
Definition Controller.h:121
Definition Group.h:35
Definition PropertyController.h:12
PropertyController(std::shared_ptr< PropertyService > propertyService, const std::shared_ptr< IAuthService > &authService, std::shared_ptr< IHistoryService > historyService)
Definition BaseFeature.h:6
constexpr std::string_view type_name()
Definition TypeName.h:9