Skip to content

Commit

Permalink
Fix config and mail
Browse files Browse the repository at this point in the history
  • Loading branch information
mekanix committed Oct 13, 2024
1 parent 45d3c0b commit bfb5ba7
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 11 deletions.
1 change: 1 addition & 0 deletions bin/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export FREENIT_ENV="build"


setup
pip install hatchling


rm -rf *.egg-info build dist
Expand Down
16 changes: 16 additions & 0 deletions bin/freenit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -451,6 +451,22 @@ EOF
}
})
</script>
EOF
cat >'src/routes/verify/+page.svelte' <<EOF
<div class="root">
<h1>Welcome</h1>
<p>You should receive email to verify your account shortly!</p>
</div>
<style>
.root {
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
height: 100%;
}
</style>
EOF

npm run format
Expand Down
4 changes: 2 additions & 2 deletions freenit/app.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
from contextlib import asynccontextmanager
from fastapi import FastAPI

import freenit.config
from .config import getConfig

from .api import api

config = freenit.config.getConfig()
config = getConfig()


@asynccontextmanager
Expand Down
2 changes: 1 addition & 1 deletion freenit/mail.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,5 @@ def sendmail(to, message):
server.ehlo()
server.starttls()
server.ehlo()
server.login(mail.username, mail.password)
server.login(mail.user, mail.password)
server.sendmail(message["From"], to, message.as_string().encode("utf-8"))
6 changes: 0 additions & 6 deletions freenit/project/bin/devel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,6 @@ export OFFLINE=${OFFLINE:="no"}
. ${BIN_DIR}/common.sh
setup

if [ ! -e "alembic/versions" ]; then
mkdir -p alembic/versions
alembic revision --autogenerate -m initial
fi
alembic upgrade head

echo "Backend"
echo "==============="
python main.py
4 changes: 2 additions & 2 deletions freenit/project/project/app.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
from contextlib import asynccontextmanager
from fastapi import FastAPI

import freenit.config
from .config import getConfig

from .api import api

config = freenit.config.getConfig()
config = getConfig()


@asynccontextmanager
Expand Down

0 comments on commit bfb5ba7

Please sign in to comment.