mirror of
https://github.com/plankanban/planka.git
synced 2025-12-20 17:25:39 +03:00
feat: Add legal requirements (#1306)
This commit is contained in:
15
server/api/hooks/query-methods/models/Config.js
Normal file
15
server/api/hooks/query-methods/models/Config.js
Normal file
@@ -0,0 +1,15 @@
|
||||
/*!
|
||||
* Copyright (c) 2024 PLANKA Software GmbH
|
||||
* Licensed under the Fair Use License: https://github.com/plankanban/planka/blob/master/LICENSE.md
|
||||
*/
|
||||
|
||||
/* Query methods */
|
||||
|
||||
const getOneMain = () => Config.findOne(Config.MAIN_ID);
|
||||
|
||||
const updateOneMain = (values) => Config.updateOne(Config.MAIN_ID).set({ ...values });
|
||||
|
||||
module.exports = {
|
||||
getOneMain,
|
||||
updateOneMain,
|
||||
};
|
||||
@@ -3,6 +3,8 @@
|
||||
* Licensed under the Fair Use License: https://github.com/plankanban/planka/blob/master/LICENSE.md
|
||||
*/
|
||||
|
||||
/* Query methods */
|
||||
|
||||
const createOne = (values) => IdentityProviderUser.create({ ...values }).fetch();
|
||||
|
||||
const getOneByIssuerAndSub = (issuer, sub) =>
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
* Licensed under the Fair Use License: https://github.com/plankanban/planka/blob/master/LICENSE.md
|
||||
*/
|
||||
|
||||
/* Query methods */
|
||||
|
||||
const createOne = (values) => Session.create({ ...values }).fetch();
|
||||
|
||||
const getOneUndeletedByAccessToken = (accessToken) =>
|
||||
@@ -11,6 +13,14 @@ const getOneUndeletedByAccessToken = (accessToken) =>
|
||||
deletedAt: null,
|
||||
});
|
||||
|
||||
const getOneUndeletedByPendingToken = (pendingToken) =>
|
||||
Session.findOne({
|
||||
pendingToken,
|
||||
deletedAt: null,
|
||||
});
|
||||
|
||||
const updateOne = (criteria, values) => Session.updateOne(criteria).set({ ...values });
|
||||
|
||||
// eslint-disable-next-line no-underscore-dangle
|
||||
const delete_ = (criteria) => Session.destroy(criteria).fetch();
|
||||
|
||||
@@ -25,6 +35,8 @@ const deleteOneById = (id) =>
|
||||
module.exports = {
|
||||
createOne,
|
||||
getOneUndeletedByAccessToken,
|
||||
getOneUndeletedByPendingToken,
|
||||
updateOne,
|
||||
deleteOneById,
|
||||
delete: delete_,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user