forked from unimatrix/web
Merge pull request 'Alpha 1.0.0.7 — The Great Migration' (#305) from dev/MC:dev/alpha-1.0.0.7-the-great-migration into main
This commit is contained in:
commit
c08251651b
1 changed files with 2 additions and 2 deletions
|
|
@ -36,12 +36,12 @@ export async function readPublicOrganisation(db){
|
|||
const official=await reader.query("SELECT a.id,a.username,a.role,p.bio FROM site_accounts a JOIN site_game_links l ON l.user_id=a.id LEFT JOIN site_profiles p ON p.user_id=a.id WHERE a.id=? AND a.username=? AND a.role='official_account' AND a.password_hash NOT LIKE '!%' AND l.minecraft_uuid=?",[OFFICIAL_ACCOUNT.id,OFFICIAL_ACCOUNT.username,OFFICIAL_ACCOUNT.minecraftUuid]);
|
||||
const result=projectPublicOrganisation(rows,order,official);
|
||||
// Public recognition is separate from appointments and never includes private audit data.
|
||||
const stats=await staffClosureStats(db);
|
||||
const stats=await staffClosureStats(reader);
|
||||
for(const person of result.staff){
|
||||
const account=await reader.query('SELECT id FROM site_accounts WHERE username=?',[person.username]);
|
||||
if(!account[0])continue;
|
||||
const id=account[0].id;
|
||||
for(const key of await badgesFor(db,id)){const file=AWARD_FILES[key]||key+'-150.png';if(/^[a-z0-9_-]+\.png$/.test(file))person.seals.push({key,label:AWARD_LABELS[key]||key.replaceAll('-',' '),file});}
|
||||
for(const key of await badgesFor(reader,id)){const file=AWARD_FILES[key]||key+'-150.png';if(/^[a-z0-9_-]+\.png$/.test(file))person.seals.push({key,label:AWARD_LABELS[key]||key.replaceAll('-',' '),file});}
|
||||
const closed=statsForAccount(stats,id);
|
||||
for(const key of ['support','ban-appeals','forum-support','legal','sales','network-staff','dev'])if(departmentAwardEarned(closed,key))person.seals.push({key:'closure-'+key,label:key+' · Service award',file:'award-'+key+'-150.png'});
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue

Staff