This repository has been archived on 2025-11-04. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
know-it-all/server/routes/auth/GetOwnedOrgs.js

11 lines
285 B
JavaScript

async function GetOwnedOrgs(req, res, next) {
// Retrieve all organizations the user owns
const user = req.user;
const result = await user.getOwnedOrg({
attributes: { exclude: ['updatedAt'] },
});
return res.send(result);
}
module.exports = GetOwnedOrgs;