don't require full login information on patch server

This commit is contained in:
Martin Michelsen
2023-12-28 09:57:47 -08:00
parent 29a4347f2b
commit 09ac8921fe
3 changed files with 55 additions and 20 deletions
+8
View File
@@ -127,6 +127,14 @@ shared_ptr<License> LicenseIndex::get(uint32_t serial_number) const {
}
}
shared_ptr<License> LicenseIndex::get_by_bb_username(const string& bb_username) const {
try {
return this->bb_username_to_license.at(bb_username);
} catch (const out_of_range&) {
throw missing_license();
}
}
vector<shared_ptr<License>> LicenseIndex::all() const {
vector<shared_ptr<License>> ret;
ret.reserve(this->serial_number_to_license.size());