campaignd: Record the original upload TS of new add-ons
This should allow future clients to sort and display add-on creation/first upload dates by looking at the original_timestamp field. NOTE: existing add-ons lack an original_timestamp field. This functionality only applies to add-ons uploaded for the first time.
This commit is contained in:
parent
7348bfe500
commit
60a8948d6a
1 changed files with 2 additions and 0 deletions
|
@ -609,6 +609,7 @@ namespace {
|
|||
|
||||
if(campaign == NULL) {
|
||||
campaign = &campaigns().add_child("campaign");
|
||||
(*campaign)["original_timestamp"] = lexical_cast<std::string>(upload_ts);
|
||||
}
|
||||
|
||||
(*campaign)["title"] = upload["title"];
|
||||
|
@ -646,6 +647,7 @@ namespace {
|
|||
data["description"] = (*campaign)["description"];
|
||||
data["version"] = (*campaign)["version"];
|
||||
data["timestamp"] = (*campaign)["timestamp"];
|
||||
data["original_timestamp"] = (*campaign)["original_timestamp"];
|
||||
data["icon"] = (*campaign)["icon"];
|
||||
data["type"] = (*campaign)["type"];
|
||||
(*campaign).clear_children("translation");
|
||||
|
|
Loading…
Add table
Reference in a new issue