daster/source/requests/writenumber.d

17 lines
389 B
D
Raw Normal View History

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();
}