bregySilvan / TabSolution

2 stars 2 forks source link

Server: POST #26

Open kaiZeiter opened 6 years ago

kaiZeiter commented 6 years ago
kaiZeiter commented 6 years ago

My Idea of the POST for the server is, that I have to read out the JSON-File add the new entrys an recreate it.

Christian-Seematter commented 6 years ago

@noulyn That is the functionality that Mr. Pfammatter will provide for you with a function or class. Your task is to write the part where express processes the POST and uses that function correctly. You should have discussed the interface for this last time.

Like Joel might tell you you will be able to do something like:

JSONEditor json = new JSONEditor.open(filePath);
json.add(position, jsonData)
json.save();

and you will then use express in src/server/app/server.ts with something like:

app.post('/location', function (req, res) {
   // Using Joel's JSONEditor method or class to save the changes
   // Returning the result JSON
});
kaiZeiter commented 6 years ago

@Christian-Seematter We thought we had discussed that. I was sure I had to do, what I described. But now I'm at the point of not getting anything anymore. Sorry for that.

I commited my post-file in the branch SeverPostIt. But so that doesn't matter anyways.

could you please rewrite your comment for simpler minds like me? :)

kaiZeiter commented 6 years ago

finished till progress of formular