node.js – How to update user’s profile in express?

I want to update a particular user’s financial records which is an array.

<– This is my user model –>

const FinanceSchema = new mongoose.Schema({
  moneyToBePaid: {
    type: Number,
  },

  moneyPaid: {
    type: Number,
  },

  moneyToBeReceived: {
    type: Number,
  },

  moneyReceived: {
    type: Number,
  },
});
const UserSchema = new mongoose.Schema({
  financialInformation: (FinanceSchema),
});

module.exports = mongoose.model("user", UserSchema);

<– This is my post route –>

router.post("/users/:id/profile", async (req, res) => {
  const _id = req.params.id;
  const {
    moneyToBePaid,
    moneyPaid,
    moneyToBeReceived,
    moneyReceived,
  } = req.body;
  const finance = {
    moneyToBePaid,
    moneyPaid,
    moneyToBeReceived,
    moneyReceived,
  };
  try {
    const user = await User.findById(_id);
    user.financialInformation.push(finance);
    await user.save();
    res.status(200).json(user);
  }

<– This is my update route –>

router.patch("/users/:user_id/profile/:profile_id", async (req, res) => {
  const user_id=req.params.user_id;
  const profile_id=req.params.profile_id;
  try {
    
    
  } 

I am confused how to update a particular user’s particular finance record.

design patterns – What architectures allow for letting users author custom domain logic?

Are there any prescribed patterns or systems for allowing a user to create custom domain logic? Consider the following scenario

An application exists that allows users to run complex calculations on the applications datasets(these calculations would be the domain logic). The owners of the application are a team of mechanical engineers, they want to update the available calculations often and frequently.

This specific problem is one im facing at work, but the problem feels generic enough that I wondered if there’s a common solution. For what its worth our current intended solution is to have the mechanical engineers write the calculations in vb using raw sql and handing us a dll to redeploy. So literally anything is better.

How to get users email address using SharePoint REST API

I am using the following code to get the current logged in user to a SP page. I’m only able to get the Title. How can I get the email address as well? Thank you.

// Get current user
jQuery.ajax({
    url: "https://.../_api/web/currentuser?$select=Title,User/ID,User/EMail&$expand=User",
    type: "GET",
    headers: {"Accept": "application/json;odata=verbose","Content-Type": "application/json;odata=verbose"},
    success: function(data) {
        username = data.d.Title;
        console.log(data.d);
        console.log("user name: " + username);
        document.getElementById("user").innerHTML = username;
    },
    error: function(data) {
        console.log("Error occurred trying to get user id");
    }
});

YouTube high quality organic promotion by real & active users for $1

YouTube high quality organic promotion by real & active users

I will provide you:
1. 200-300 views.
2. 100 likes —— [ALL IN ONLY 1$]
3. 20 channel sbscribers.

4. 5 comments.


[note: If you want more sbscribers or likes or comments or views then you can add extra. And if you have any questions then please give me a message.]
!CHEAPEST YOUTUB PROMOTION OFFER ON SEOCLERKS!

Real sbscribers are very important for your channel. My service 100% helps you to promote your channel. Real people will

sbscribe to your channel. So you will get real human sbscribers. My service will not break any YouTube rules. Your YouTube channel will remain safe. My service helps you to get monetization.

GUARANTEE Refund Your Payment.
*** My work quality***
1. All accounts real.

2. All account with photo.

3. 100% manually work.

4. All accounts are very good.

5. less price but power boosting service.

6. Google friendly.

7. Provide you the best service.

8. Refill if drops through drop are rare.

***Features***
24/7 support.

All profiles have profile pictures

100% Safe for your CHANNEL

No admin access /no password needed!

100% SATISFACTION GUARANTEED

Please send me your order without any hesitation.



If you want more sbscribers or likes or commets or views then you can add extra. And if you have

any questions then please give me a message.

.

How aware are typical users of browser zoom functionality?

Ideally I’m looking for quantitative research on this, if it exists, but I’d also be interested in anecdotal evidence from observing user behavior.

To what extent is the average user aware, of and comfortable using, the browser zoom feature? This can be either via menus, Ctrl++/-/0 (or Mac equivalents), or Ctrl+ mouse wheel?

The reason I ask is because scaling issues seem to be pretty commonplace with multi-screen setups where one screen has a different pixel density. To what extent should this be a UX concern in terms of optimizing for all possible display setups, or to what extent will users “instinctively” know they can just zoom in/out as needed?

How can I invite other private users to a private Trello Board?

I’ve setup a private Trello board and wish to invite some private users to it.

But when i click on invite it asks me to setup a team (see screenshot below)

screenshot of Trello invite button

My understanding is Teams are a paid feature of a Business plan. I only want to add private users to a private board so don’t need a Business Plan.

How can I invite other private users to a private Trello Board

Trello – How can i invite other private users to a private Trello Board?

Ive setup a private Trello board and wish to invite some private users to it.

But when i click on invite it asks me to setup a team (see screenshot below)

screenshot of Trello invite button

My understanding is Teams are a paid feature of a Business plan. I only want to add private users to a private board so dont need a Business Plan.

How can i invite other private users to a private Trello Board

security – How to restrict Jenkins node by label for a group of users

The situation

Say I have a Jenkins installations with multi-branch pipelines which executes on nodes which are implemented as ECS Tasks in AWS. The nodes have specific IAM roles which allow to do certain things like access a certain secret. The coded pipelines choose the node dynamically by label. So far so good.

In this setup, Jenkins is connected through LDAP to OpenLDAP and there are groups set up. Permissions are handled through the “role based strategy”

For the blessed branch of the pipelines there are code reviews but in theory any user can create a branch and use the coded pipeline to retrieve the secrets which the node is allowed to read.

In this situation I though the correct way to enforce security is to prevent certain groups to run jobs on certain nodes.

The question

How can I restrict the usage of a certain node for a certain group of users by label ?

What I tried so far

Since I believe the role based strategy can assign group permissions based on the node name and the ECS nodes get their names based on <cluster name>-<random string> I tried to

  • create a cluster with a specific name for the nodes I want to be able to restrict
  • created two groups eg. standard and privileged
  • globally deny “build” permission for standard group
  • allow “build” permission for standard group on nodes named like <non-privileged cluster name>-.*|master|Jenkins

The problem with this is: it didn’t work for master (some non-privileged pipelines need to perform tasks on the master). I got error messages like 'XXXXXXXX' lacks permission to run on 'Jenkins'