mirror of
https://github.com/gristlabs/grist-core.git
synced 2024-10-27 20:44:07 +00:00
style fixes
This commit is contained in:
parent
87af7a36cd
commit
ccdd551b4d
@ -100,7 +100,7 @@ export function getRequestProfile(req: Request): UserProfile|undefined {
|
||||
let profile: UserProfile|undefined;
|
||||
|
||||
if (header && req.headers && req.headers[header]) {
|
||||
let headerContent = req.headers[header];
|
||||
const headerContent = req.headers[header];
|
||||
if (headerContent) {
|
||||
const userEmail = headerContent.toString();
|
||||
const [userName] = userEmail.split("@", 1);
|
||||
|
@ -157,10 +157,11 @@ Comm.prototype._broadcastMessage = function(type, data, clients) {
|
||||
*/
|
||||
Comm.prototype._getSessionProfile = function(scopedSession, req) {
|
||||
const profile = getRequestProfile(req);
|
||||
if (profile)
|
||||
if (profile) {
|
||||
return Promise.resolve(profile);
|
||||
else
|
||||
} else {
|
||||
return scopedSession.getSessionProfile();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user