17 lines
389 B
D
17 lines
389 B
D
module requests.writenumber;
|
||
|
||
import vibe.vibe;
|
||
import response;
|
||
import structures;
|
||
import data;
|
||
import singlog;
|
||
|
||
void writeNumber(HTTPServerRequest req, HTTPServerResponse res) {
|
||
NumberDB number = deserializeJson!NumberDB(req.json);
|
||
if (!sqlInsertNumber(number)) {
|
||
res.send(true, "Не удалось записать номер");
|
||
return;
|
||
}
|
||
res.send();
|
||
}
|