Commit b268fb2f authored by Frauke's avatar Frauke

Added routes for getting sign keys

parent 981175a5
......@@ -41,8 +41,8 @@ app.post('/register', (req, res) => {
})
})
app.get('/publickey', (req, res) => {
fileUtils.readFile('./server/files/publickey.json').then((data) => {
app.get('/encryptpublickey', (req, res) => {
fileUtils.readFile('./server/files/encryptpublickey.json').then((data) => {
data = JSON.parse(data)
res.status(200).send(data)
}).catch((err) => {
......@@ -51,8 +51,28 @@ app.get('/publickey', (req, res) => {
})
})
app.get('/privatekey', (req, res) => {
fileUtils.readFile('./server/files/privatekey.json').then((data) => {
app.get('/encryptprivatekey', (req, res) => {
fileUtils.readFile('./server/files/encryptprivatekey.json').then((data) => {
data = JSON.parse(data)
res.status(200).send(data)
}).catch((err) => {
res.status(500).send('Ooops, something went wrong')
console.log(err)
})
})
app.get('/signpublickey', (req, res) => {
fileUtils.readFile('./server/files/signpublickey.json').then((data) => {
data = JSON.parse(data)
res.status(200).send(data)
}).catch((err) => {
res.status(500).send('Ooops, something went wrong')
console.log(err)
})
})
app.get('/signprivatekey', (req, res) => {
fileUtils.readFile('./server/files/signprivatekey.json').then((data) => {
data = JSON.parse(data)
res.status(200).send(data)
}).catch((err) => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment