MCPcopy Create free account
hub / github.com/RealDevSquad/website-backend / getJoinData

Function getJoinData

models/users.js:200–215  ·  view source on GitHub ↗
(userId)

Source from the content-addressed store, hash-verified

198 });
199 } catch (err) {
200 logger.error("Error in adding data", err);
201 throw err;
202 }
203};
204
205const getJoinData = async (userId) => {
206 try {
207 const userData = [];
208 const joinData = await joinModel.where("userId", "==", userId).limit(1).get();
209 joinData.forEach((data) => {
210 userData.push({
211 ...data.data(),
212 id: data.id,
213 });
214 });
215 return userData;
216 } catch (err) {
217 logger.log("Could not get", err);
218 throw err;

Callers

nothing calls this directly

Calls 1

getMethod · 0.80

Tested by

no test coverage detected