|
|
Home » U++ Library support » Skylark » Skylark : GetIdentity alternative way of working
|
|
|
|
|
Re: Skylark : GetIdentity alternative way of working [message #57564 is a reply to message #53802] |
Sat, 25 September 2021 22:42 |
|
Klugier
Messages: 1087 Registered: September 2012 Location: Poland, Kraków
|
Senior Contributor |
|
|
Hello Xemuth,
I saw your recent message. I think you should just create PR into Mirek's repository and code could be review there. This should also speed the time when changes will be present on master/main branch of Skylark.
However, I have a questions to the current solution (in context of framework improvement we need to think more globally rather than locally (how to fix my problem only)):
- What if there will be more than one identity (is this reasonable scenario)? Could we call several post_identity in one witz file?
- Backwards compatibility - does it break something?
You could simplify your solution
//New
for(const Upp::String& key : http->var.GetKeys()){
if(key.Find("__identity__") != -1){
return http->var.Get(key).ToString();
}
}
auto s = AsString(Uuid::Create());
Also extract this ""__identity__" (magic string problem) into constexpr variable (example):
constexpr const char* IDENITY = "__identity__";
Klugier
U++ - one framework to rule them all.
[Updated on: Sat, 25 September 2021 22:44] Report message to a moderator
|
|
|
|
Goto Forum:
Current Time: Sat Dec 14 15:11:38 CET 2024
Total time taken to generate the page: 0.02490 seconds
|
|
|