blob: db715f47b4968f9e8a81911c6d5a212884fb0080 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
#include "strusCms.hpp"
#include <cppcms/url_mapper.h>
#include <cppcms/http_response.h>
#include <cppcms/json.h>
namespace apps {
strusCms::strusCms( cppcms::service &srv )
: cppcms::application( srv ),
conn( settings( ).get<std::string>( "strusCms.db_connection" ) ),
intro( *this ),
user( *this )
{
locale_name = "en";
script = settings( ).get<std::string>( "strusCms.script" );
add( intro );
add( user );
mapper( ).root( "/strusCms" );
}
std::string strusCms::root( std::string l )
{
if( l.empty( ) ) l = locale_name;
return script + "/" + l;
}
}
|