daster/source/requests/updatenumber.d

17 lines
391 B
D
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

module requests.updatenumber;
import vibe.vibe;
import response;
import data;
import singlog;
import structures;
void updateNumber(HTTPServerRequest req, HTTPServerResponse res) {
NumberDB number = deserializeJson!NumberDB(req.json);
if (!sqlUpdateNumber(number)) {
res.send(true, "Не удалось обновить номер");
return;
}
res.send();
}