mirror of
https://github.com/sergeyyarkov/digital-store.git
synced 2026-10-11 10:19:15 +03:00
js & img type
This commit is contained in:
parent
c20037d8ed
commit
e4fa09f07c
@ -80,7 +80,11 @@ module.exports = function(server, db) {
|
||||
server.get('/api/buyers', checkAuthenticated, async (req, res) => {
|
||||
try {
|
||||
const buyers = await db.collection('buyers').find({}).toArray();
|
||||
res.json(buyers);
|
||||
if (buyers.length > 0) {
|
||||
res.json(buyers);
|
||||
} else res.send({
|
||||
error: 'Покупателей в магазине пока что нет.'
|
||||
});
|
||||
} catch {
|
||||
res.status(500).render('main/404');
|
||||
}
|
||||
|
||||
2
dist/public/js/admin.js
vendored
2
dist/public/js/admin.js
vendored
File diff suppressed because one or more lines are too long
2
dist/views/admin/assets/templates/header.pug
vendored
2
dist/views/admin/assets/templates/header.pug
vendored
@ -11,7 +11,7 @@ header.admin-header
|
||||
.user-view
|
||||
.background
|
||||
img(src="/img/admin/background-user.jpg", alt="#")
|
||||
span(style="padding-top: 5px;padding-bottom:10px;display:block;").white-text Control Panel v1.0.0
|
||||
span(style="padding-top: 5px;padding-bottom:10px;display:block;").white-text Панель управления
|
||||
a(href="#")
|
||||
img(class="circle" src="/img/admin/avatar-user.jpg", alt="alt")
|
||||
a(href="#")
|
||||
|
||||
2
dist/views/admin/icons.pug
vendored
2
dist/views/admin/icons.pug
vendored
@ -17,7 +17,7 @@ body.has-fixed-sidenav
|
||||
.file-field.input-field.col.s12
|
||||
.btn.orange
|
||||
span Иконка
|
||||
input(type="file" name="img" required)
|
||||
input(type="file" accept="image/*" name="img" required)
|
||||
.file-path-wrapper
|
||||
input(type="text" class="file-path" placeholder="Загрузите иконку в формате .svg")
|
||||
button(type="submit" class="btn right" style="margin-right: 10px;") Добавить
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user